ExceptionRegion modeling issues and proposed improvements

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Oct 9 10:49:28 UTC 2024


On 09/10/2024 11:24, Adam Sotona wrote:
>
> Yes, that is also enforced by the current model spec. A NPE thrown and 
> handled in in block_19 needs to first leave exception.region.exit %5, 
> while in block_20 it leaves a different region entry and in block_21 
> it is technically out of the regions. I don't think the lifting 
> algorithm is optimal, however proposed change clearing the exception 
> stack when thrown will definitely remove this synthetic "leaving the 
> exception region" blocks.
>
> > My feeling is that these little discrepancies add up quite a lot... 
> if we could see that e.g. we leave the regions in 7 and 8 only to 
> reenter them again in 9 and 10, then surely we can omit these 
> redundant blocks (given they don't seem to be reachable from anywhere 
> else). Also, the duplication between block 19 and 20 is annoying as well.
>
The more I look into the liftec blocks, the more I'm confused :-)

For instance, I get that block 19 and 20 need to leave "nominally 
different" regions - hence the split. What I don't get is why block 27 
gets to be reused. In fact, if we end up in block 27, there's no exit - 
and we go straight to block 1, which will enter again. Is this correct?

If we wanted to exit the region from block 27, then we'd also need to 
split, as we might need to exit either %1 or %5 from there, no?

Maurizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/babylon-dev/attachments/20241009/a2df547e/attachment.htm>


More information about the babylon-dev mailing list