-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define new Pre- and PostEscapeAnalysis passes #6654
Define new Pre- and PostEscapeAnalysis passes #6654
Conversation
I'm marking this change a WIP while I run some testing on it, to ensure I haven't broken anything. |
4ff665f
to
e3c4869
Compare
@vijaysun-omr Vijay, as noted above, Andrew pointed out that the EA changes that are part of pull request #5737 need the Pre- and PostEscapeAnalysis passes to be operational. But that requires a change in OMR, which will be done under OMR pull request #3842. In order to break the cycle of dependencies, the definitions and implementations of PreEscapeAnalysis and PostEscapeAnalysis have been pulled out into this pull request. As you previously reviewed these changes under pull request #5737, may I ask you to re-review this subset here? There are no substantive changes. |
Thanks @hzongaro I have approved this. @andrewcraik please review as well and merge if you are good with it. |
This change defines new optimization passes, preEscapeAnalysis and postEscapeAnalysis, that are designed to help Escape Analysis (EA) do a better job under voluntary OSR. The new preEscapeAnalysis optimization looks for calls to OSRInductionHelper and adds a fake prepareForOSR call that references all live auto symrefs and pending pushes. The goal is that any object that ends up as a candidate for stack allocation that appears to be used by such a fake prepareForOSR call can be heapified by EA at that point. That will be delivered in a subsequent change to EA. After EA, the postEscapeAnalysis pass will remove the fake calls to prepareForOSR. Submitted on behalf of Andrew Craik <ajcraik@ca.ibm.com> Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
Added Doxygen comments to provide a high-level description of the new PreEscapeAnalysis and PostEscapeAnalysis optimizations that help with EscapeAnalysis, as well as for methods in PreEscapeAnalysis to document their function. Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
5b375e5
to
35eddf4
Compare
Jenkins test sanity xlinux,win,plinux jdk8,jdk11 |
This change defines new optimization passes, preEscapeAnalysis and postEscapeAnalysis, that are designed to help Escape Analysis (EA) do a better job under voluntary OSR.
The new
preEscapeAnalysis
optimization looks for calls toOSRInductionHelper
and adds a fakeprepareForOSR
call that references all live auto symrefs and pending pushes. The goal is that any object that ends up as a candidate for stack allocation that appears to be used by such a fakeprepareForOSR
call can be heapified by EA at that point. That will be delivered in a subsequent change to EA.After EA, the
postEscapeAnalysis
pass will remove the fake calls toprepareForOSR
.These changes are a proper subset of the changes that were previously pull requested and reviewed under pull request #5737. The changes to EA that take advantage of the work that PreEscapeAnalysis performs require that pass to actually run. In order to do that, PreEscapeAnslysis and PostEscapeAnalysis need to be added to the optimization strategies that run EA in OMR, and in order to do, the optimizations need to exist. Hence, this pull request.
Submitted on behalf of Andrew Craik ajcraik@ca.ibm.com
Signed-off-by: Henry Zongaro zongaro@ca.ibm.com