RFR: 8271340: Crash PhaseIdealLoop::clone_outer_loop [v3]
Tobias Hartmann
thartmann at openjdk.java.net
Fri Sep 3 08:26:28 UTC 2021
On Fri, 3 Sep 2021 08:19:32 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> > Would the following code I added to Valhalla help?
> > [openjdk/valhalla at f43fafc#diff-f4a11a2c3f7d7342641c878277f778856ad329e4e09026e39d08afb03efd10a2R1958](https://github.com/openjdk/valhalla/commit/f43fafc7d81f3d34f6e971765dbadae41ae5c393#diff-f4a11a2c3f7d7342641c878277f778856ad329e4e09026e39d08afb03efd10a2R1958)
>
> I'm not sure. How would it help in this particular case?
I thought it might help by aggressively removing the parts not reachable from the bottom (but still reachable from root).
> In any case, it seems to me NeverBranchNode::Ideal() is simply wrong. As I understand, when loop opts hit an infinite loop it creates a NeverBranchNode but because the infinite loop is not properly registered in the loop tree, the loop's Region is not transformed into a Loop node. On the next pass of loop opts, if the NeverBranch is still in the infinite loop, a Loop is created for the infinite loop. But if NeverBranchNode::Ideal() runs in between then a new NeverBranch is added and maybe and only in some later loop opts pass a Loop created. So AFAICT, the behavior is inconsistent depending on whether NeverBranchNode::Ideal() runs or not which doesn't seem right.
Thanks for the details. That makes sense.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5220
More information about the hotspot-compiler-dev
mailing list