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

8274328: C2: Redundant CFG edges fixup in block ordering #5705

Closed
wants to merge 3 commits into from

Conversation

@kelthuzadx
Copy link
Member

@kelthuzadx kelthuzadx commented Sep 26, 2021

I think Trace::fixup_blocks is redundant because PhaseCFG::fixup_flow will nevertheless fix up the CFG flow(i.e. flip successor blocks of IfNode) right after PhaseBlockLayout pass, we can remove this step when doing PhaseBlockLayout pass.(Testing: jtreg/compiler/c2, presubmit test)

cfg.fixup_flow();

tr->fixup_blocks(_cfg);

// Fall-thru case in succs[0], so flip targets in succs map
Block* tbs0 = block->_succs[0];
Block* tbs1 = block->_succs[1];
block->_succs.map(0, tbs1);
block->_succs.map(1, tbs0);
// Flip projection for each target
ProjNode* tmp = proj0;
proj0 = proj1;
proj1 = tmp;


Progress

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

Issue

  • JDK-8274328: C2: Redundant CFG edges fixup in block ordering

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5705

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 26, 2021

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

Loading

@kelthuzadx kelthuzadx changed the title C2: Redundant CFG flow fixup in block ordering 8274328: C2: Redundant CFG flow fixup in block ordering Sep 26, 2021
@kelthuzadx kelthuzadx changed the title 8274328: C2: Redundant CFG flow fixup in block ordering 8274328: C2: Redundant CFG edges fixup in block ordering Sep 26, 2021
@openjdk openjdk bot added the rfr label Sep 27, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 27, 2021

@kelthuzadx 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.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 27, 2021

Webrevs

Loading

@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented Oct 25, 2021

PING :-

Loading

Copy link
Member

@TobiHartmann TobiHartmann left a comment

That looks good to me but I'm not an expert in that code. I submitted some testing and it all passed.

Loading

@@ -914,7 +914,6 @@ void PhaseCFG::fixup_flow() {
ProjNode* tmp = proj0;
proj0 = proj1;
proj1 = tmp;
Copy link
Member

@TobiHartmann TobiHartmann Oct 28, 2021

Choose a reason for hiding this comment

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

swap(proj0, proj1) can be used here.

Loading

Copy link
Member Author

@kelthuzadx kelthuzadx Nov 1, 2021

Choose a reason for hiding this comment

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

Thanks Tobias for review. I have replaced above code with swap(pointer ref,pointer ref)

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2021

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

8274328: C2: Redundant CFG edges fixup in block ordering

Reviewed-by: thartmann, kvn

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

  • 59c3dcc: 8276746: Add section on reproducible builds in building.md
  • 0e0dd33: 8276129: PretouchTask should page-align the chunk size
  • a472433: 8276572: Fake libsyslookup.so library causes tooling issues
  • b01f107: 8276252: java/nio/channels/Channels/TransferTo.java failed with OOM java heap space error
  • 92d2176: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
  • a74a839: 8276571: C2: pass compilation options as structure
  • c393ee8: 8276632: Use blessed modifier order in security-libs code
  • 7023b3f: 8276628: Use blessed modifier order in serviceability code
  • b933136: 8276641: Use blessed modifier order in jshell
  • 0616d86: 8276635: Use blessed modifier order in compiler code
  • ... and 132 more: https://git.openjdk.java.net/jdk/compare/9f75d5ce500886b32175cc541939b7f0eee190ca...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.

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

Loading

@openjdk openjdk bot added the ready label Oct 28, 2021
Copy link
Member

@TobiHartmann TobiHartmann left a comment

Thanks, looks good.

Loading

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Nov 5, 2021

That looks good to me but I'm not an expert in that code. I submitted some testing and it all passed.

@TobiHartmann please add links to testing in RFE.

Loading

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Looks good.

Loading

@kelthuzadx
Copy link
Member Author

@kelthuzadx kelthuzadx commented Nov 8, 2021

Thanks @TobiHartmann and @vnkozlov for reviews!

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Nov 8, 2021

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

  • 8849154: 8275846: read_base_archive_name() could read past the end of buffer
  • 2653cfb: 8276688: Remove JLinkReproducibleXXXTest from ProblemList.txt
  • c7095b2: 8276207: Properties.loadFromXML/storeToXML works incorrectly for supplementary characters
  • ed7ecca: 8254739: G1: Optimize evacuation failure for regions with few failed objects
  • 59c3dcc: 8276746: Add section on reproducible builds in building.md
  • 0e0dd33: 8276129: PretouchTask should page-align the chunk size
  • a472433: 8276572: Fake libsyslookup.so library causes tooling issues
  • b01f107: 8276252: java/nio/channels/Channels/TransferTo.java failed with OOM java heap space error
  • 92d2176: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
  • a74a839: 8276571: C2: pass compilation options as structure
  • ... and 136 more: https://git.openjdk.java.net/jdk/compare/9f75d5ce500886b32175cc541939b7f0eee190ca...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Nov 8, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 8, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 8, 2021

@kelthuzadx Pushed as commit 44047f8.

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

Loading

@kelthuzadx kelthuzadx deleted the blockordering branch Nov 8, 2021
@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Nov 8, 2021

@TobiHartmann please add links to testing in RFE.

Done.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants