8382489: aarch64: Clean up redundant restore_locals() in TemplateTable::invokeinterface#30813
8382489: aarch64: Clean up redundant restore_locals() in TemplateTable::invokeinterface#30813zifeihan wants to merge 1 commit intoopenjdk:masterfrom
Conversation
…e::invokeinterface
|
👋 Welcome back gcao! A progress list of the required criteria for merging this PR into |
|
@zifeihan This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 33 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@theRealAph, @RealFYang, @DingliZhang) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
|
You appear to have used a generative AI tool to create this PR. This violates the OpenJDK AI Policy (https://openjdk.org/legal/ai). Please close this PR and open a new PR that does not contain any AI-generated content. |
Thank you for your suggestion. I used AI to help me write the PR description. I’ve already created a new PR. #30864 |
Summary
Remove redundant
restore_locals()calls inTemplateTable::invokeinterface()on AArch64 and RISC-V architectures. On x86, this call is necessary because the implementation explicitly usesrlocals(r14) as a temporary register throughout the invokeinterface handler, modifying it in multiple code paths. However, on AArch64 and RISC-V, the locals register (rlocals/xlocals) remains untouched throughout the entire invokeinterface execution, making the restore call redundant.Problem
In
templateTable_aarch64.cpp, theinvokeinterface()bytecode handler contains arestore_locals()call at the
notVFinallabel that is never needed because no preceding code path modifies the locals register.Code Flow Analysis
Testing
tier1, tier2 tests on linux-aarch64(fastdebug)
I confirm that I make this contribution in accordance with the OpenJDK Interim AI Policy.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30813/head:pull/30813$ git checkout pull/30813Update a local copy of the PR:
$ git checkout pull/30813$ git pull https://git.openjdk.org/jdk.git pull/30813/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30813View PR using the GUI difftool:
$ git pr show -t 30813Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30813.diff
Using Webrev
Link to Webrev Comment