提交 e44e1eed 编写于 作者: K kvn

8039050: Crash in C2 compiler at Node::rematerialize

Summary: Added missing calls to record_for_igvn() in loop opts. Added verification of def-use domination.
Reviewed-by: iveresov
上级 455c27bc
...@@ -1147,6 +1147,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_ ...@@ -1147,6 +1147,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
// Now force out all loop-invariant dominating tests. The optimizer // Now force out all loop-invariant dominating tests. The optimizer
// finds some, but we _know_ they are all useless. // finds some, but we _know_ they are all useless.
peeled_dom_test_elim(loop,old_new); peeled_dom_test_elim(loop,old_new);
loop->record_for_igvn();
} }
//------------------------------is_invariant----------------------------- //------------------------------is_invariant-----------------------------
......
...@@ -3171,17 +3171,16 @@ bool PhaseIdealLoop::verify_dominance(Node* n, Node* use, Node* LCA, Node* early ...@@ -3171,17 +3171,16 @@ bool PhaseIdealLoop::verify_dominance(Node* n, Node* use, Node* LCA, Node* early
bool had_error = false; bool had_error = false;
#ifdef ASSERT #ifdef ASSERT
if (early != C->root()) { if (early != C->root()) {
// Make sure that there's a dominance path from use to LCA // Make sure that there's a dominance path from LCA to early
Node* d = use; Node* d = LCA;
while (d != LCA) { while (d != early) {
d = idom(d);
if (d == C->root()) { if (d == C->root()) {
tty->print_cr("*** Use %d isn't dominated by def %s", use->_idx, n->_idx); dump_bad_graph("Bad graph detected in compute_lca_of_uses", n, early, LCA);
n->dump(); tty->print_cr("*** Use %d isn't dominated by def %d ***", use->_idx, n->_idx);
use->dump();
had_error = true; had_error = true;
break; break;
} }
d = idom(d);
} }
} }
#endif #endif
...@@ -3434,6 +3433,13 @@ void PhaseIdealLoop::build_loop_late_post( Node *n ) { ...@@ -3434,6 +3433,13 @@ void PhaseIdealLoop::build_loop_late_post( Node *n ) {
_igvn._worklist.push(n); // Maybe we'll normalize it, if no more loops. _igvn._worklist.push(n); // Maybe we'll normalize it, if no more loops.
} }
#ifdef ASSERT
if (_verify_only && !n->is_CFG()) {
// Check def-use domination.
compute_lca_of_uses(n, get_ctrl(n), true /* verify */);
}
#endif
// CFG and pinned nodes already handled // CFG and pinned nodes already handled
if( n->in(0) ) { if( n->in(0) ) {
if( n->in(0)->is_top() ) return; // Dead? if( n->in(0)->is_top() ) return; // Dead?
......
...@@ -2698,6 +2698,7 @@ bool PhaseIdealLoop::partial_peel( IdealLoopTree *loop, Node_List &old_new ) { ...@@ -2698,6 +2698,7 @@ bool PhaseIdealLoop::partial_peel( IdealLoopTree *loop, Node_List &old_new ) {
// Inhibit more partial peeling on this loop // Inhibit more partial peeling on this loop
new_head_clone->set_partial_peel_loop(); new_head_clone->set_partial_peel_loop();
C->set_major_progress(); C->set_major_progress();
loop->record_for_igvn();
#if !defined(PRODUCT) #if !defined(PRODUCT)
if (TracePartialPeeling) { if (TracePartialPeeling) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册