-
Notifications
You must be signed in to change notification settings - Fork 396
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
Rename disableTOCForConsts option and disable TOC when the opti… #4443
Conversation
I'm not sure if there's a better way to disable the TOC (a more central location). I tried to follow the example of how it is done in AOT. Please let me know if there's a better way to do this. Also, we will probably need a different query since |
This PR is part of the work in eclipse-openj9/openj9#6991 |
@ymanton For this PR we can't use the
This query will return true in OMR, but will return Another alternative is something you suggested in another PR where we would make Both of these approaches will also allow us to toggle this behaviour easily when we eventually enable TOC in JITServer mode. Additionally, there aren't much more places around the codebase where we will need to use these queries, as most of the TOC related code goes through one of pre-existing routines modified in this PR. Let me know which one you think is better or if there's a better alternative. |
Here's another alternative that doesn't require making the TOC extensible: We have an option called
|
In the ARM codegen we only use this option inside here: And this code is guarded by an So I think it should be safe renaming and the uses of the constants looks okay. The only other place in the power codegen where this option is used is: And given the context, I think this is reasonable as well. |
The previous name for this option doesn't add much value and the new name can be used to disable the TOC for any number of reasons. Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
3918aa7
to
e1002a7
Compare
@ymanton As discussed offline, I've renamed the option here, and made the appropriate changes in the codegen to prevent TOC code from being generated when the option is set. |
e1002a7
to
28a7bce
Compare
See eclipse-openj9/openj9#7958 for related OpenJ9 PR. The TOC will now be disabled in the downstream project in JITServer mode only. |
28a7bce
to
78dfb26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of it looks fine to me.
78dfb26
to
2163152
Compare
@ymanton Ready for another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This commit makes the allocateChunk and lookup methods inside the TR_PPCTableOfConstants class return PTOC_FULL_INDEX if the TR_DisableTOC compiler option is set. Doing so will prevent the power code generator from ever generating code that uses the TOC, effectively disabling the TOC. Adding this option here allows downstream projects to easily disable TOC when needed. Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
2163152
to
a3342a3
Compare
@genie-omr build all |
x86 build failed with:
ARM build failed with:
These don't look related to this PR. |
Yeah I just checked the ARM change in the PR is just a rename and the Power has actual code changes which passed. I feel comfortable merging this in light of the infrastructure failures above. |
This PR renames the
disableTOCForConstants
option to justdisableTOC
, and then uses the option to prevent the PPC code generator from being able to generate TOC code.Signed-off-by: Dhruv Chopra Dhruv.C.Chopra@ibm.com