8352595: Regression of JDK-8314999 in IR matching#24163
8352595: Regression of JDK-8314999 in IR matching#24163marc-chevalier wants to merge 6 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back marc-chevalier! A progress list of the required criteria for merging this PR into |
|
@marc-chevalier 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: 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 19 new commits pushed to the
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 (@chhagedorn, @TobiHartmann) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@marc-chevalier To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command. Applicable Labels
|
98f574b to
17e11d4
Compare
chhagedorn
left a comment
There was a problem hiding this comment.
Thanks for addressing this. I have some comments.
| @IR(counts = {IRNode.ALLOC, "2", IRNode.ALLOC_OF, "Object", "1"}) | ||
| @ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_OPTO_ASSEMBLY, counts = 1) | ||
| @ExpectedFailure(ruleId = 5, phase = CompilePhase.BEFORE_MACRO_EXPANSION, counts = 1) | ||
| public void defaultOnBoth() { |
There was a problem hiding this comment.
I think for this test you should add a matching on some PrintOptoAssembly as well since it tries to verify ideal and opto matching.
| @IR(counts = {IRNode.CBZ_HI, "> 1"}) | ||
| public void test4() {} | ||
|
|
||
|
|
||
| @Test | ||
| @IR(failOn = IRNode.FIELD_ACCESS) | ||
| @IR(counts = {IRNode.CHECKCAST_ARRAY, "2"}) | ||
| @IR(failOn = {IRNode.CBNZW_HI}) | ||
| @IR(counts = {IRNode.CBZ_LS, "2", IRNode.CBZW_LS, "> 1"}) | ||
| public void test5() {} | ||
|
|
||
| @Test | ||
| @IR(failOn = {IRNode.CHECKCAST_ARRAYCOPY, IRNode.CHECKCAST_ARRAY_OF, "Foo"}) | ||
| @IR(counts = {IRNode.ALLOC, "2", IRNode.ALLOC_ARRAY_OF, "Foo", "> 1"}) | ||
| @IR(failOn = {IRNode.CBNZW_HI}) | ||
| @IR(counts = {IRNode.CBZW_LS, "> 1"}) |
There was a problem hiding this comment.
I've just noticed that these AArch64 specific IRNode entries do not have a check that they are only supported on AArch64. In the past, I've added some platform checks for IRNode entries only being supported on certain platforms:
jdk/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java
Lines 2905 to 2925 in e23e0f8
We should probably add a similar check for these CB* entries. But that's something that can be done separately.
For this test here, we only collect compile phases and it does not matter on what platforms these IRNode entries are eventually used. So, no action to be done in your changes here.
| OPTIMIZE_FINISHED, PRINT_IDEAL); | ||
| assertContainsOnly(methodToCompilePhases, testClass, "mix8", PHASEIDEALLOOP1, PHASEIDEALLOOP2, FINAL_CODE, | ||
| OPTIMIZE_FINISHED, PRINT_IDEAL, PRINT_OPTO_ASSEMBLY); | ||
| OPTIMIZE_FINISHED, PRINT_IDEAL); |
There was a problem hiding this comment.
Note that the tests on this file only collect compile phases and actually do not perform any IR matching. So, the IR rules do not need work. This means that for all tests where we use the default compile phase of ALLOC (which is PRINT_OPTO_ASSEMBLY), we can replace ALLOC with just something else that defaults on PRINT_OPTO_ASSEMBLY.
This just means that we should not replace PRINT_OPTO_ASSEMBLY with BEFORE_MACRO_EXPANSION here but instead use a different IRNode in the IR rules at these tests that default on PRINT_OPTO_ASSEMBLY. I've made some comments further down where this applies. The other changes in the file look fine.
test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompilePhaseCollector.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompilePhaseCollector.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompilePhaseCollector.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompilePhaseCollector.java
Outdated
Show resolved
Hide resolved
|
/label add hotspot-compiler |
|
@marc-chevalier |
Webrevs
|
|
Yes, I indeed misunderstood which tests were specifically for ALLOC, and which were about OptoAssembly, and ALLOC is just a mean. The new diff makes more sense, indeed. |
chhagedorn
left a comment
There was a problem hiding this comment.
Thanks for the update, looks good!
TobiHartmann
left a comment
There was a problem hiding this comment.
Looks good to me too. Ship it!
|
/integrate Let's |
|
@marc-chevalier |
|
/sponsor |
|
Going to push as commit c94bc74.
Your commit was automatically rebased without conflicts. |
|
@chhagedorn @marc-chevalier Pushed as commit c94bc74. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
A lot of tests for the IR framework used
ALLOCand friends as a check that would run on the Opto assembly by default, but can also run earlier, but that's no longer the case.There were two kinds of tests to fix: the ones rather about
ALLOC, where the used or expected compile phases have to change, and the tests whereALLOCwere just a check that would run on opto assembly. For this, I tried to keep the spirit of the test using other regexes made for this stage.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24163/head:pull/24163$ git checkout pull/24163Update a local copy of the PR:
$ git checkout pull/24163$ git pull https://git.openjdk.org/jdk.git pull/24163/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24163View PR using the GUI difftool:
$ git pr show -t 24163Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24163.diff
Using Webrev
Link to Webrev Comment