src/share/vm/opto/loopTransform.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8148754-cr Cdiff src/share/vm/opto/loopTransform.cpp
src/share/vm/opto/loopTransform.cpp
Print this page
*** 1452,1468 ****
Node *opaq = NULL;
if (adjust_min_trip) { // If not maximally unrolling, need adjustment
// Search for zero-trip guard.
assert( loop_head->is_main_loop(), "" );
! assert( ctrl->Opcode() == Op_IfTrue || ctrl->Opcode() == Op_IfFalse, "" );
Node *iff = ctrl->in(0);
! assert( iff->Opcode() == Op_If, "" );
Node *bol = iff->in(1);
! assert( bol->Opcode() == Op_Bool, "" );
Node *cmp = bol->in(1);
! assert( cmp->Opcode() == Op_CmpI, "" );
opaq = cmp->in(2);
// Occasionally it's possible for a zero-trip guard Opaque1 node to be
// optimized away and then another round of loop opts attempted.
// We can not optimize this particular loop in that case.
if (opaq->Opcode() != Op_Opaque1)
--- 1452,1481 ----
Node *opaq = NULL;
if (adjust_min_trip) { // If not maximally unrolling, need adjustment
// Search for zero-trip guard.
assert( loop_head->is_main_loop(), "" );
! // In some cases, the shape of the graph does not match the shape
! // outlined below (because other optimizations, e.g., split-if and loop
! // peeling have transformed it). Loop unrolling is not possible in these
! // cases, so give the attempt to unroll the loop (but still continue
! // compilation).
! if (ctrl->Opcode() != Op_IfTrue && ctrl->Opcode() != Op_IfFalse) {
! return;
! }
Node *iff = ctrl->in(0);
! if (iff->Opcode() != Op_If) {
! return;
! }
Node *bol = iff->in(1);
! if (bol->Opcode() != Op_Bool) {
! return;
! }
Node *cmp = bol->in(1);
! if (cmp->Opcode() != Op_CmpI) {
! return;
! }
opaq = cmp->in(2);
// Occasionally it's possible for a zero-trip guard Opaque1 node to be
// optimized away and then another round of loop opts attempted.
// We can not optimize this particular loop in that case.
if (opaq->Opcode() != Op_Opaque1)
src/share/vm/opto/loopTransform.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File