8389108: RISC-V: C2: Optimize identity hash mask extraction with shift pair - #32046
Open
zifeihan wants to merge 1 commit into
Open
8389108: RISC-V: C2: Optimize identity hash mask extraction with shift pair#32046zifeihan wants to merge 1 commit into
zifeihan wants to merge 1 commit into
Conversation
Member
Author
|
/contributor add @DingliZhang |
|
👋 Welcome back gcao! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@zifeihan |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, please consider that.
On RISC-V, extracting the 31-bit identity hash from the mark word requires an AND with hash_mask (0x7FFFFFFF). The generic path loads this constant into a register and then performs a register-register AND:
opto log without this patch:
assembly log without this patch:
This patch adds a specialized AD rule
andI_31bitsthat uses a shift pair (slli 33 + srli 33) to clear the upper 33 bits, replacing the constant load and AND. UsingiRegIorL2Ias the source operand also subsumes the preceding ConvL2I, eliminating theaddw.opto log witch this patch:
assembly log with this patch:
Testing
Performance Test:
specjbb2015 without this patch on SG2044:
specjbb2015 witch this patch on SG2044:
Progress
Issue
Contributors
<dzhang@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32046/head:pull/32046$ git checkout pull/32046Update a local copy of the PR:
$ git checkout pull/32046$ git pull https://git.openjdk.org/jdk.git pull/32046/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32046View PR using the GUI difftool:
$ git pr show -t 32046Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32046.diff
Using Webrev
Link to Webrev Comment