src/share/vm/opto/loopTransform.cpp

changeset 2699
cb162b348743
parent 2694
f9424955eb18
child 2708
1d1603768966
child 2727
08eb13460b3a
     1.1 --- a/src/share/vm/opto/loopTransform.cpp	Thu Mar 31 02:31:57 2011 -0700
     1.2 +++ b/src/share/vm/opto/loopTransform.cpp	Thu Mar 31 13:22:34 2011 -0700
     1.3 @@ -432,6 +432,12 @@
     1.4      return false;
     1.5    }
     1.6  
     1.7 +  // Currently we don't have policy to optimize one iteration loops.
     1.8 +  // Maximally unrolling transformation is used for that:
     1.9 +  // it is peeled and the original loop become non reachable (dead).
    1.10 +  if (trip_count == 1)
    1.11 +    return true;
    1.12 +
    1.13    // Do not unroll a loop with String intrinsics code.
    1.14    // String intrinsics are large and have loops.
    1.15    for (uint k = 0; k < _body.size(); k++) {

mercurial