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

8256883: C2: Add a RegMask iterator #1397

Closed
wants to merge 6 commits into from
Closed

Conversation

cl4es
Copy link
Member

@cl4es cl4es commented Nov 23, 2020

By implementing a simple RegMaskIterator we can speed this up and possibly make the code a bit clearer by doing so.

As a data point, this reduce the C2Compiler::initialize overhead from 8.82M instructions to 8.58M instructions, from the improvement in PhaseChaitin::post_allocate_copy_removal (~16k insns/compilation). The gain varies with type of compilation, so on the naive tests in SimpleRepeatCompilation it's in the noise (~2k insns/compilation on `trivialMath, for example).


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Testing

Linux aarch64 Linux arm Linux ppc64le Linux s390x Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (6/6 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1397/head:pull/1397
$ git checkout pull/1397

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 23, 2020

👋 Welcome back redestad! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

@cl4es The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler label Nov 23, 2020
@cl4es cl4es marked this pull request as ready for review Nov 23, 2020
@openjdk openjdk bot added the rfr label Nov 23, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 23, 2020

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

There are 2 places in ZGC code (x86 and aarch64) which could use new iterator too:
https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L482

@openjdk openjdk bot added hotspot and removed hotspot-compiler labels Nov 23, 2020
@cl4es
Copy link
Member Author

@cl4es cl4es commented Nov 23, 2020

/label remove hotspot
/label add hotspot-gc
/label add hotspot-compiler

@openjdk openjdk bot removed the hotspot label Nov 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

@cl4es
The hotspot label was successfully removed.

@openjdk openjdk bot added the hotspot-gc label Nov 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

@cl4es
The hotspot-gc label was successfully added.

@openjdk openjdk bot added the hotspot-compiler label Nov 23, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 23, 2020

@cl4es
The hotspot-compiler label was successfully added.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Good.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 24, 2020

@cl4es 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:

8256883: C2: Add a RegMask iterator

Reviewed-by: kvn, pliden, eosterlund

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 29 new commits pushed to the master branch:

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 24, 2020
pliden
pliden approved these changes Nov 24, 2020
Copy link
Contributor

@pliden pliden left a comment

ZGC changes look good.

fisk
fisk approved these changes Nov 24, 2020
Copy link
Contributor

@fisk fisk left a comment

Looks good.

@cl4es
Copy link
Member Author

@cl4es cl4es commented Nov 24, 2020

@vnkozlov @pliden @fisk - thank you for reviewing!

I ran ZGC tier1-7 testing on linux-x64 and linux-aarch64 overnight, all passed.

/integrate

@openjdk openjdk bot closed this Nov 24, 2020
@openjdk openjdk bot added the integrated label Nov 24, 2020
@openjdk openjdk bot removed ready rfr labels Nov 24, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 24, 2020

@cl4es Since your change was applied there have been 31 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit fa3cfcd.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk-notifier bot referenced this issue Nov 24, 2020
Reviewed-by: kvn, pliden, eosterlund
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-gc integrated
4 participants