Mercurial > hg > truffle
comparison src/share/vm/opto/loopnode.cpp @ 17887:cd3c534f8f4a
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
author | kvn |
---|---|
date | Tue, 15 Apr 2014 14:34:48 -0700 |
parents | 3213ba4d3dff |
children | 3636afd5ec1a |
comparison
equal
deleted
inserted
replaced
17886:7e6c20c85ccf | 17887:cd3c534f8f4a |
---|---|
3169 | 3169 |
3170 bool PhaseIdealLoop::verify_dominance(Node* n, Node* use, Node* LCA, Node* early) { | 3170 bool PhaseIdealLoop::verify_dominance(Node* n, Node* use, Node* LCA, Node* early) { |
3171 bool had_error = false; | 3171 bool had_error = false; |
3172 #ifdef ASSERT | 3172 #ifdef ASSERT |
3173 if (early != C->root()) { | 3173 if (early != C->root()) { |
3174 // Make sure that there's a dominance path from use to LCA | 3174 // Make sure that there's a dominance path from LCA to early |
3175 Node* d = use; | 3175 Node* d = LCA; |
3176 while (d != LCA) { | 3176 while (d != early) { |
3177 d = idom(d); | |
3178 if (d == C->root()) { | 3177 if (d == C->root()) { |
3179 tty->print_cr("*** Use %d isn't dominated by def %s", use->_idx, n->_idx); | 3178 dump_bad_graph("Bad graph detected in compute_lca_of_uses", n, early, LCA); |
3180 n->dump(); | 3179 tty->print_cr("*** Use %d isn't dominated by def %d ***", use->_idx, n->_idx); |
3181 use->dump(); | |
3182 had_error = true; | 3180 had_error = true; |
3183 break; | 3181 break; |
3184 } | 3182 } |
3183 d = idom(d); | |
3185 } | 3184 } |
3186 } | 3185 } |
3187 #endif | 3186 #endif |
3188 return had_error; | 3187 return had_error; |
3189 } | 3188 } |
3432 | 3431 |
3433 if (n->req() == 2 && n->Opcode() == Op_ConvI2L && !C->major_progress() && !_verify_only) { | 3432 if (n->req() == 2 && n->Opcode() == Op_ConvI2L && !C->major_progress() && !_verify_only) { |
3434 _igvn._worklist.push(n); // Maybe we'll normalize it, if no more loops. | 3433 _igvn._worklist.push(n); // Maybe we'll normalize it, if no more loops. |
3435 } | 3434 } |
3436 | 3435 |
3436 #ifdef ASSERT | |
3437 if (_verify_only && !n->is_CFG()) { | |
3438 // Check def-use domination. | |
3439 compute_lca_of_uses(n, get_ctrl(n), true /* verify */); | |
3440 } | |
3441 #endif | |
3442 | |
3437 // CFG and pinned nodes already handled | 3443 // CFG and pinned nodes already handled |
3438 if( n->in(0) ) { | 3444 if( n->in(0) ) { |
3439 if( n->in(0)->is_top() ) return; // Dead? | 3445 if( n->in(0)->is_top() ) return; // Dead? |
3440 | 3446 |
3441 // We'd like +VerifyLoopOptimizations to not believe that Mod's/Loads | 3447 // We'd like +VerifyLoopOptimizations to not believe that Mod's/Loads |