src/share/vm/opto/loopnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
8039298 Cdiff src/share/vm/opto/loopnode.cpp
src/share/vm/opto/loopnode.cpp
Print this page
*** 265,277 ****
bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
PhaseGVN *gvn = &_igvn;
// Counted loop head must be a good RegionNode with only 3 not NULL
// control input edges: Self, Entry, LoopBack.
! if (x->in(LoopNode::Self) == NULL || x->req() != 3)
return false;
!
Node *init_control = x->in(LoopNode::EntryControl);
Node *back_control = x->in(LoopNode::LoopBackControl);
if (init_control == NULL || back_control == NULL) // Partially dead
return false;
// Must also check for TOP when looking for a dead loop
--- 265,277 ----
bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
PhaseGVN *gvn = &_igvn;
// Counted loop head must be a good RegionNode with only 3 not NULL
// control input edges: Self, Entry, LoopBack.
! if (x->in(LoopNode::Self) == NULL || x->req() != 3 || loop->_irreducible) {
return false;
! }
Node *init_control = x->in(LoopNode::EntryControl);
Node *back_control = x->in(LoopNode::LoopBackControl);
if (init_control == NULL || back_control == NULL) // Partially dead
return false;
// Must also check for TOP when looking for a dead loop
*** 1521,1535 ****
result = true;
}
// If I have one hot backedge, peel off myself loop.
// I better be the outermost loop.
! if( _head->req() > 3 ) {
split_outer_loop( phase );
result = true;
! } else if( !_head->is_Loop() && !_irreducible ) {
// Make a new LoopNode to replace the old loop head
Node *l = new (phase->C) LoopNode( _head->in(1), _head->in(2) );
l = igvn.register_new_node_with_optimizer(l, _head);
phase->set_created_loop_node();
// Go ahead and replace _head
--- 1521,1535 ----
result = true;
}
// If I have one hot backedge, peel off myself loop.
// I better be the outermost loop.
! if (_head->req() > 3 && !_irreducible) {
split_outer_loop( phase );
result = true;
! } else if (!_head->is_Loop() && !_irreducible) {
// Make a new LoopNode to replace the old loop head
Node *l = new (phase->C) LoopNode( _head->in(1), _head->in(2) );
l = igvn.register_new_node_with_optimizer(l, _head);
phase->set_created_loop_node();
// Go ahead and replace _head
*** 2937,2946 ****
--- 2937,2947 ----
if (l == NULL) {
C->record_method_not_compilable("unhandled CFG detected during loop optimization");
return pre_order;
}
}
+ C->set_has_irreducible_loop(_has_irreducible_loops);
}
// This Node might be a decision point for loops. It is only if
// it's children belong to several different loops. The sort call
// does a trivial amount of work if there is only 1 child or all
src/share/vm/opto/loopnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File