ExceptionRegion modeling issues and proposed improvements
Adam Sotona
adam.sotona at oracle.com
Mon Oct 14 08:00:41 UTC 2024
From: Paul Sandoz <paul.sandoz at oracle.com>
> Ok. I suspect with that approach we can support what we have today and the relaxed form you are proposing e.g. an region exit can either refer to an associated region enter by value or explicitly to the handlers by successor.
I would prefer the only one way, or the interpretation would go crazy (for example enter multiple, exit partially with reference one of the entered handler, and later (or in another flow path) exit by a reference to the enter).
Let's try the only change that exit does not refer to a specific enter but directly to one or more handlers exited (in a reverse enter order).
> How would this work with control flow? I think you would need distinct handlers corresponding to each store.
Not necessary, this is already possible for single level try/catch and the above proposed change will enable it also for nested. The handler is still the same, there are just more flow paths leading to it.
> FWIW C2 does not bother with anything fancy, it just treats it as a box that cannot be SSA’ed. This may indicate it may not be worth the complexity.
This fix is not just about broken SSA, the missing flow path breaks any analysis of the affected variables (including correct variable type resolution from code segments).
Thanks,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/babylon-dev/attachments/20241014/9fcfd8ef/attachment.htm>
More information about the babylon-dev
mailing list