< prev index next >
src/hotspot/share/opto/loopnode.cpp
Print this page
rev 50110 : 8203215: IdealLoopTree::split_outer_loop leaves phi-nodes with only one input
Summary: Make sure the phis are transformed
Reviewed-by:
@@ -2639,13 +2639,10 @@
ResourceMark rm;
int old_progress = C->major_progress();
uint orig_worklist_size = _igvn._worklist.size();
- // Reset major-progress flag for the driver's heuristics
- C->clear_major_progress();
-
#ifndef PRODUCT
// Capture for later assert
uint unique = C->unique();
_loop_invokes++;
_loop_work += unique;
@@ -2712,15 +2709,20 @@
// Split shared headers and insert loop landing pads.
// Do not bother doing this on the Root loop of course.
if( !_verify_me && !_verify_only && _ltree_root->_child ) {
C->print_method(PHASE_BEFORE_BEAUTIFY_LOOPS, 3);
if( _ltree_root->_child->beautify_loops( this ) ) {
+ // IdealLoopTree::split_outer_loop may produce phi-nodes with a single in edge.
+ // Transform them away.
+ _igvn.optimize();
+
// Re-build loop tree!
_ltree_root->_child = NULL;
_nodes.clear();
reallocate_preorders();
build_loop_tree();
+
// Check for bailout, and return
if (C->failing()) {
return;
}
// Reset loop nesting depth
@@ -2728,10 +2730,13 @@
C->print_method(PHASE_AFTER_BEAUTIFY_LOOPS, 3);
}
}
+ // Reset major-progress flag for the driver's heuristics
+ C->clear_major_progress();
+
// Build Dominators for elision of NULL checks & loop finding.
// Since nodes do not have a slot for immediate dominator, make
// a persistent side array for that info indexed on node->_idx.
_idom_size = C->unique();
_idom = NEW_RESOURCE_ARRAY( Node*, _idom_size );
< prev index next >