Skip to content
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

Merged
merged 2 commits into from
Aug 21, 2019

Conversation

hzongaro
Copy link
Member

@hzongaro hzongaro commented Aug 1, 2019

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.

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

@hzongaro
Copy link
Member Author

hzongaro commented Aug 1, 2019

I'm marking this change a WIP while I run some testing on it, to ensure I haven't broken anything.

@hzongaro hzongaro changed the title WIP: Define new Pre- and PostEscapeAnalysis passes Define new Pre- and PostEscapeAnalysis passes Aug 7, 2019
@hzongaro
Copy link
Member Author

hzongaro commented Aug 7, 2019

@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.

@vijaysun-omr
Copy link
Contributor

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>
@andrewcraik andrewcraik self-assigned this Aug 9, 2019
@andrewcraik
Copy link
Contributor

Jenkins test sanity xlinux,win,plinux jdk8,jdk11

@andrewcraik andrewcraik merged commit adae0b5 into eclipse-openj9:master Aug 21, 2019
@hzongaro hzongaro deleted the ea-staging-branch-step1.5 branch August 21, 2019 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants