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

8267265: Use new IR Test Framework to create tests for C2 IGV transformations #5135

Closed
wants to merge 152 commits into from
Closed

Conversation

JohnTortugo
Copy link
Contributor

@JohnTortugo JohnTortugo commented Aug 17, 2021

Hi, can I please get some reviews for this Pull Request? Here is a summary of the changes:

  • Add tests, using the new IR-based test framework, for several of the Ideal transformations on Add, Sub, Mul, Div, Loop nodes and some simple Scalar Replacement transformations.
  • Add more default IR regex's to IR-based test framework.
  • Changes to Sub, Div and Add Ideal nodes to that transformations on Int and Long types are the whenever possible same.
  • Changes to SubNode, DivNode and Add*Node Ideal methods to fix some bugs and include new transformations.
  • New JTREG "ir_transformations" test group under test/hotspot/jtreg.

Progress

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

Issue

  • JDK-8267265: Use new IR Test Framework to create tests for C2 IGV transformations

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5135/head:pull/5135
$ git checkout pull/5135

Update a local copy of the PR:
$ git checkout pull/5135
$ git pull https://git.openjdk.java.net/jdk pull/5135/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5135

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5135.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 17, 2021

👋 Welcome back JohnTortugo! 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.

@JohnTortugo
Copy link
Contributor Author

JohnTortugo commented Aug 17, 2021

/contributor add @jtfuller111

@openjdk
Copy link

openjdk bot commented Aug 17, 2021

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

  • hotspot

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 hotspot-dev@openjdk.org label Aug 17, 2021
@openjdk
Copy link

openjdk bot commented Aug 17, 2021

@JohnTortugo Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@JohnTortugo
Copy link
Contributor Author

/contributor add @jtfuller111

@openjdk
Copy link

openjdk bot commented Aug 17, 2021

@JohnTortugo Could not parse @jtfuller111 as a valid contributor.
Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 17, 2021
@JohnTortugo
Copy link
Contributor Author

@chhagedorn - I finally managed to get some time to work again on this. Can you please take a look?

@mlbridge
Copy link

mlbridge bot commented Aug 17, 2021

Webrevs

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

First of all, thanks a lot for diving into the various C2 IR transformations and creating IR tests for them! It's valuable to have a test for each of them. Some general points:

  • I think you should split the work into the creation of new IR tests of existing transformations (this RFE) and changing actual C2 IR transformations. I suggest to file a new RFE or bug for missing/potential wrong transformations with the corresponding IR tests for them.
  • I have only skimmed through the IR tests, yet. I will wait with reviewing them closer in case you decide to transform some of them into custom run tests (see comments in files).
  • You should add the hotspot-compiler label to the PR as the tests are for C2.

Thanks,
Christian

test/hotspot/jtreg/TEST.groups Outdated Show resolved Hide resolved
src/hotspot/share/opto/divnode.cpp Outdated Show resolved Hide resolved
src/hotspot/share/opto/divnode.cpp Outdated Show resolved Hide resolved
test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java Outdated Show resolved Hide resolved
@JohnTortugo
Copy link
Contributor Author

/label add hotspot-compiler

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Aug 19, 2021
@openjdk
Copy link

openjdk bot commented Aug 19, 2021

@JohnTortugo
The hotspot-compiler label was successfully added.

@JohnTortugo
Copy link
Contributor Author

JohnTortugo commented Aug 19, 2021

* I think you should split the work into the creation of new IR tests of existing transformations (this RFE) and changing actual C2 IR transformations. I suggest to file a new RFE or bug for missing/potential wrong transformations with the corresponding IR tests for them.

I just created this RFE for the discussion/work on adjusting the Ideal transformations.

Thomas Schatzl and others added 22 commits August 31, 2021 14:12
…ll fails due to "An established connection was aborted by the software in your host machine"

Reviewed-by: xuelei, rhalade
Reviewed-by: bchristi, smarks
Reviewed-by: alanb, rriggs
…except lookup is null

Reviewed-by: mchung, chegar
…ake a significant amount of time

Reviewed-by: tschatzl, ayang
Reviewed-by: sjohanss, tschatzl
…Types because tree.meth.type is null

Co-authored-by: Jan Lahoda <jlahoda@openjdk.org>
Co-authored-by: Vicente Romero <vromero@openjdk.org>
Reviewed-by: jlahoda
Reviewed-by: redestad, ihse, dfuchs
8273198: ProblemList java/lang/instrument/BootClassPath/BootClassPathTest.sh due to JDK-8273188

Reviewed-by: naoto
…ts, add tests for other optimizations, rename some tests.
@openjdk
Copy link

openjdk bot commented Sep 1, 2021

⚠️ @JohnTortugo This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@JohnTortugo
Copy link
Contributor Author

Hi folks,

I'd appreciate if you could take a look again. I addressed the comments so far and here is a summary of the latest changes:

  • Moved all tests to directory /compiler/c2/irTests under hotspot JTREG group.
  • Added a few custom run tests for testing some corner cases.
  • Renamed some tests files and some test methods.
  • Added new tests for testing the changes introduced by JDK-8270823

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Thanks for your effort to write tests for all these different kinds of transformations! Generally, they look good and are worth to have! You should add @bug 8267265 to all files.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 3, 2021

@JohnTortugo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 1, 2021

@JohnTortugo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org rfr Pull request is ready for review