Skip to content

Conversation

@theoweidmannoracle
Copy link
Contributor

@theoweidmannoracle theoweidmannoracle commented Nov 1, 2024

This patch removes the address type from GraphKit::make_load() and GraphKit::store_to_memory()

As #21303 introduced asserts that check that the address type agrees with C->get_alias_index(_gvn.type(adr)->isa_ptr(), passing the address type is redundant and it can be computed internally from the address.


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-8341411: C2: remove slice parameter from GraphKit::make_load() and GraphKit::store_to_memory() (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21834

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Nov 1, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 1, 2024

Hi @theoweidmannoracle, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user theoweidmannoracle" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Nov 1, 2024

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

8341411: C2: remove slice parameter from GraphKit::make_load() and GraphKit::store_to_memory()

Reviewed-by: thartmann, roland

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

  • 133f8f3: 8344014: Simplify TracePhase constructor
  • d334af0: 8344089: Fix wrong location of TestWrongMinLWiden.java
  • 79345bb: 8339783: Implement JEP 479: Remove the Windows 32-bit x86 Port
  • 2eeaa57: 8343944: C2: MinLNode::add_ring() computes _widen wrongly leading to an endless widening/compilation
  • e9ede46: 8343508: Parallel: Use ordinary klass accessor in verify_filler_in_dense_prefix
  • c78de7b: 8343964: RISC-V: Improve PrintOptoAssembly output for loadNKlassCompactHeaders node
  • eb40a88: 8343430: RISC-V: C2: Remove old trampoline call
  • b26e495: 8343801: Change string printed by nsk_null_string for null strings
  • a4e2c20: 8343344: Windows attach logic failed to handle a failed open on a pipe
  • 63eb485: 8343883: Cannot resolve user specified toolchain-path for lld after JDK-8338304
  • ... and 165 more: https://git.openjdk.org/jdk/compare/f77a5144a12fc31bad8b672a3cc9caa688d78e72...master

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 (@TobiHartmann, @rwestrel) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Nov 1, 2024

@theoweidmannoracle The following labels will be automatically applied to this pull request:

  • graal
  • hotspot

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

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Nov 1, 2024
@bridgekeeper bridgekeeper bot removed the oca Needs verification of OCA signatory status label Nov 5, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 5, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 5, 2024

Webrevs

@theoweidmannoracle theoweidmannoracle changed the title 8341411: C2: remove slice parameter from GraphKit::make_load() and GraphKit::store_to_memor() 8341411: C2: remove slice parameter from GraphKit::make_load() and GraphKit::store_to_memory() Nov 5, 2024
Copy link
Member

@TobiHartmann TobiHartmann 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 to me. @rwestrel who proposed the change, should also have a look.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 6, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 7, 2024
@theoweidmannoracle
Copy link
Contributor Author

@TobiHartmann @rwestrel I added new assert as discussed with @rwestrel. It would be great if you could review the new changes again.

Copy link
Contributor

@rwestrel rwestrel 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 to me.
I'm wondering it we can go further and in:

Node* LoadNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, BasicType bt, MemOrd mo,
                     ControlDependency control_dependency, bool require_atomic_access, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) {

remove the adr_type parameter (because it should be gvn.type(adr)). Something similar must be possible for Store. Then in the gc api:

  C2AccessValuePtr addr(adr, adr_type);
  C2ParseAccess access(this, decorators | C2_READ_ACCESS, bt, obj, addr);

would we even need to pass adr_type?
Do we want to file a bug about to, at least, give it a try?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 12, 2024
@TobiHartmann
Copy link
Member

Looks good to me too.

Do we want to file a bug about to, at least, give it a try?

Sounds reasonable, let's file a follow-up RFE for this.

@theoweidmannoracle
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 13, 2024
@openjdk
Copy link

openjdk bot commented Nov 13, 2024

@theoweidmannoracle
Your change (at version 8d239fd) is now ready to be sponsored by a Committer.

@theoweidmannoracle
Copy link
Contributor Author

Thanks for the reviews.

I opened a follow-up RFE: https://bugs.openjdk.org/browse/JDK-8344116

@TobiHartmann
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 13, 2024

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

  • b72fe75: 8343140: JfrJavaSupport uses the wrong accessors for sub-int fields
  • 133f8f3: 8344014: Simplify TracePhase constructor
  • d334af0: 8344089: Fix wrong location of TestWrongMinLWiden.java
  • 79345bb: 8339783: Implement JEP 479: Remove the Windows 32-bit x86 Port
  • 2eeaa57: 8343944: C2: MinLNode::add_ring() computes _widen wrongly leading to an endless widening/compilation
  • e9ede46: 8343508: Parallel: Use ordinary klass accessor in verify_filler_in_dense_prefix
  • c78de7b: 8343964: RISC-V: Improve PrintOptoAssembly output for loadNKlassCompactHeaders node
  • eb40a88: 8343430: RISC-V: C2: Remove old trampoline call
  • b26e495: 8343801: Change string printed by nsk_null_string for null strings
  • a4e2c20: 8343344: Windows attach logic failed to handle a failed open on a pipe
  • ... and 166 more: https://git.openjdk.org/jdk/compare/f77a5144a12fc31bad8b672a3cc9caa688d78e72...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 13, 2024
@openjdk openjdk bot closed this Nov 13, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Nov 13, 2024
@openjdk
Copy link

openjdk bot commented Nov 13, 2024

@TobiHartmann @theoweidmannoracle Pushed as commit 8af304c.

💡 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

graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants