[lworld] RFR: 8265726: [lworld] C2 compilation fails with assert "uses must be dominated by definitions" [v2]

Tobias Hartmann thartmann at openjdk.java.net
Mon Apr 26 09:45:00 UTC 2021

> We hit an assert during `PhaseCFG` because the Phi input to a CatchNode does not dominate. The problem is in `PhaseMacroExpand::expand_mh_intrinsic_return` where we rewire projection nodes to merge the state of the slow call in. 
> Here's the `invokeBasic` call before macro expansion:
> ![BeforeMacroExpand](https://user-images.githubusercontent.com/5312595/115862604-9b8e9700-a434-11eb-862f-eee42bcf0504.png)
> And after macro expansion:
> ![AfterMacroExpand](https://user-images.githubusercontent.com/5312595/115862618-a1847800-a434-11eb-8bd1-fa01d5f518fc.png)
> The input of the CatchNode was accidentally replaced by the Phi merging the exception IO from both calls.
> The fix is to re-connect the CatchNode.
> Thanks,
> Tobias

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  Do not hoist constant loads with MachConstantBaseNode input


  - all: https://git.openjdk.java.net/valhalla/pull/391/files
  - new: https://git.openjdk.java.net/valhalla/pull/391/files/1bc32600..a75a6678

 - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=391&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=391&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/391.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/391/head:pull/391

PR: https://git.openjdk.java.net/valhalla/pull/391

More information about the valhalla-dev mailing list