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

8293999: [JVMCI] need support for aligned constants in generated code larger than 8 bytes #10392

Conversation

bulasevich
Copy link
Contributor

@bulasevich bulasevich commented Sep 22, 2022


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8293999: [JVMCI] need support for aligned constants in generated code larger than 8 bytes

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10392/head:pull/10392
$ git checkout pull/10392

Update a local copy of the PR:
$ git checkout pull/10392
$ git pull https://git.openjdk.org/jdk pull/10392/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10392

View PR using the GUI difftool:
$ git pr show -t 10392

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10392.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 22, 2022

👋 Welcome back bulasevich! 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 bot commented Sep 22, 2022

@bulasevich 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 hotspot-compiler-dev@openjdk.org label Sep 22, 2022
@bulasevich bulasevich force-pushed the 8293999_graal_constSectionAlignment branch 2 times, most recently from 9823817 to 86a1e9a Compare October 5, 2022 13:07
@bulasevich bulasevich force-pushed the 8293999_graal_constSectionAlignment branch from 86a1e9a to 851d58b Compare October 13, 2022 15:15
@bulasevich bulasevich force-pushed the 8293999_graal_constSectionAlignment branch 2 times, most recently from 7a08f87 to 80693ef Compare October 21, 2022 09:17
@bulasevich bulasevich marked this pull request as ready for review October 23, 2022 09:06
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 23, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 23, 2022

Webrevs

#if INCLUDE_JVMCI
if (EnableJVMCI) {
// Graal vectorization requires larger aligned constants
return 64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means all Graal installed code will pay a penalty even though most installed code does not include constants that need such large alignment. It would be preferable to allow a compiler to specify the alignment requirement per nmethod.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. The alignment should probably be a field in CodeBuffer with a default value of 8.

@openjdk-notifier
Copy link

@bulasevich Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@bulasevich bulasevich force-pushed the 8293999_graal_constSectionAlignment branch from f743a42 to 59ff8c4 Compare October 28, 2022 06:44
@openjdk-notifier
Copy link

@bulasevich Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@openjdk
Copy link

openjdk bot commented Oct 28, 2022

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

8293999: [JVMCI] need support for aligned constants in generated code larger than 8 bytes

Reviewed-by: dlong, dnsimon

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

  • 823fd4a: 8293785: Add a jtreg test for TraceOptoParse
  • 754bd53: 8296030: compiler/c2/irTests/TestVectorizeTypeConversion.java fails with release VMs after JDK-8291781
  • 1fdbb1b: 8295926: RISC-V: C1: Fix LIRGenerator::do_LibmIntrinsic
  • cf5546b: 8291336: Add ideal rule to convert floating point multiply by 2 into addition
  • 4b89fce: 8291781: assert(!is_visited) failed: visit only once with -XX:+SuperWordRTDepCheck
  • d5d3424: 8295405: Add cause in a couple of IllegalArgumentException and InvalidParameterException shown by sun/security/pkcs11 tests

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 Pull request is ready to be integrated label Oct 28, 2022
@@ -456,6 +454,9 @@ class CodeBuffer: public StackObj DEBUG_ONLY(COMMA private Scrubber) {
_insts.initialize_outer(this, SECT_INSTS);
_stubs.initialize_outer(this, SECT_STUBS);

// default value. should be changed if vectorization requires large aligned constants
Copy link
Member

@dougxc dougxc Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not make this comment so vectorization specific. Just say something like:

// Default is to align on 8 bytes. A compiler can change this
// if larger alignment (e.g., 32-byte vector masks) is required.

@bulasevich
Copy link
Contributor Author

thanks!

@bulasevich
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 29, 2022

Going to push as commit f3ca0ca.
Since your change was applied there have been 9 commits pushed to the master branch:

  • 8aa1526: 8285835: SIGSEGV in PhaseIdealLoop::build_loop_late_post_work
  • a44ebd5: 8295849: Consolidate Threads::owning_thread*
  • 1c86cf5: 8294672: Typo in description of JDWP VirtualMachine/AllThreads command
  • 823fd4a: 8293785: Add a jtreg test for TraceOptoParse
  • 754bd53: 8296030: compiler/c2/irTests/TestVectorizeTypeConversion.java fails with release VMs after JDK-8291781
  • 1fdbb1b: 8295926: RISC-V: C1: Fix LIRGenerator::do_LibmIntrinsic
  • cf5546b: 8291336: Add ideal rule to convert floating point multiply by 2 into addition
  • 4b89fce: 8291781: assert(!is_visited) failed: visit only once with -XX:+SuperWordRTDepCheck
  • d5d3424: 8295405: Add cause in a couple of IllegalArgumentException and InvalidParameterException shown by sun/security/pkcs11 tests

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 29, 2022
@openjdk openjdk bot closed this Oct 29, 2022
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 29, 2022
@openjdk openjdk bot removed the rfr Pull request is ready for review label Oct 29, 2022
@openjdk
Copy link

openjdk bot commented Oct 29, 2022

@bulasevich Pushed as commit f3ca0ca.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants