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

Avoid control flow for copying heap allocations to temporaries #8364

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

hzongaro
Copy link
Member

Updates of all the temporaries that contain the address of a candidate object for cold block heapification are currently guarded with ifacmpne instructions. In order to simplify the control flow graph produced for heapification before cold blocks, replace the conditional update of each
temporary with an unconditional store using the result of an aternary instruction that either updates the temporary with the heap object address or with the current contents of the temporary unconditionally. This update is inserted into the start of the cold block rather than in
a new block preceding the cold block.

This is only done if code generation supports ternary opcodes. If ternary opcodes are not supported, ifacmpne checks are still generated instead. The ifacmpne checks can also be forced by setting the environment variable TR_disableTernaryOpForEA.

Signed-off-by: Henry Zongaro zongaro@ca.ibm.com

@hzongaro
Copy link
Member Author

Andrew @andrewcraik, may I ask you to review this change?

Updates of all the temporaries that contain the address of a candidate
object for cold block heapification are currently guarded with ifacmpne
instructions.  In order to simplify the control flow graph produced for
heapification before cold blocks, replace the conditional update of each
temporary with an unconditional store using the result of an aternary
instruction that either updates the temporary with the heap object
address or with the current contents of the temporary unconditionally.
This update is inserted into the start of the cold block rather than in
a new block preceding the cold block.

This is only done if code generation supports ternary opcodes.  If
ternary opcodes are not supported, ifacmpne checks are still generated
instead.  The ifacmpne checks can also be forced by setting the
environment variable TR_disableTernaryOpForEA.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro
Copy link
Member Author

Andrew @andrewcraik, I've squashed the two commits into one.

By the way, I know there are pull requests #7797 and eclipse/omr#4578 outstanding for renaming the ternary opcodes to switch. I'm just wondering whether those should take precedence over this change.

@andrewcraik
Copy link
Contributor

#7797 is dependent on eclipse/omr#4578 so is marked WIP. 4578 is still under review while I think this is pretty much ready. I am going to start sanity and unless there are objections from @alvee-unb or @0xdaryl I feel this should merge once ready and that mans #7797 will need to be updated... If the rename lands before we are ready then the update to this PR will not be significant to handle the name change.

@andrewcraik
Copy link
Contributor

Jenkins test sanity all jdk11

@andrewcraik andrewcraik merged commit 03d14e6 into eclipse-openj9:master Jan 23, 2020
@hzongaro hzongaro deleted the ea-generate-aternary branch January 24, 2020 15:57
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.

None yet

2 participants