On 2/24/25 2:23 AM, Richard Biener wrote:
On Fri, Feb 21, 2025 at 4:55 PM Konstantinos Eleftheriou
<konstantinos.elefther...@vrull.eu> wrote:
Hi Richard, thanks for the feedback.
On Tue, Feb 18, 2025 at 9:17 PM Richard Biener
<richard.guent...@gmail.com> wrote:
Am 18.02.2025 um 17:04 schrieb Konstantinos Eleftheriou
<konstantinos.elefther...@vrull.eu>:
From: kelefth <konstantinos.elefther...@vrull.eu>
The pass rejects the transformation when there are instructions in the
sequence that might throw an exception. This was added due to having
cases that the load instruction contains a REG_EH_REGION note and
moving it before the store instructions caused an error, as it was
no longer the last instruction in the basic block.
This patch handles those cases by moving a possible REG_EH_REGION
note from the load instruction of the store-load sequence to the
last instruction of the basic block.
But that’s not a correct transform and will lead to bogus exception handling?
You’d need to move the note and split the block, possibly updating the EH info
on the side.
I had originally thought about splitting the block, but tried to get
away with this solution. In case that we are splitting the block after
the load, we wouldn't need to also move the note, right?
I don't think it makes much sense in trying to handle loads/stores with EH,
you generally can't re-order stuff around EH since that changes what is
observable from the EH handler and the EH might also guard exceptions
on later stmts.
But if all the old statements and all the new/adjusted statements are in
the same EH region is this still a problem?
Jeff