src/share/vm/opto/loopnode.cpp

changeset 9922
f7691a80458c
parent 9910
4373df7c4a92
child 9931
fd44df5e3bc3
child 9977
e649f2136368
     1.1 --- a/src/share/vm/opto/loopnode.cpp	Mon May 25 07:03:06 2020 +0100
     1.2 +++ b/src/share/vm/opto/loopnode.cpp	Mon May 25 14:24:27 2020 +0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -1538,10 +1538,18 @@
    1.11    // If I am a shared header (multiple backedges), peel off the many
    1.12    // backedges into a private merge point and use the merge point as
    1.13    // the one true backedge.
    1.14 -  if (_head->req() > 3 && !_irreducible) {
    1.15 +  if (_head->req() > 3) {
    1.16      // Merge the many backedges into a single backedge but leave
    1.17      // the hottest backedge as separate edge for the following peel.
    1.18 -    merge_many_backedges( phase );
    1.19 +    if (!_irreducible) {
    1.20 +      merge_many_backedges( phase );
    1.21 +    }
    1.22 +
    1.23 +    // When recursively beautify my children, split_fall_in can change
    1.24 +    // loop tree structure when I am an irreducible loop. Then the head
    1.25 +    // of my children has a req() not bigger than 3. Here we need to set
    1.26 +    // result to true to catch that case in order to tell the caller to
    1.27 +    // rebuild loop tree. See issue JDK-8244407 for details.
    1.28      result = true;
    1.29    }
    1.30  

mercurial