JDK 21 |
---|
21 b02Fixed |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
We should catch problems like JDK-8257166 during CCP by adding some verification code: @@ -1717,11 +1717,13 @@ void PhaseCCP::analyze() { // Push root onto worklist Unique_Node_List worklist; worklist.push(C->root()); + DEBUG_ONLY(Unique_Node_List worklist_verify;) // Pull from worklist; compute new value; push changes out. // This loop is the meat of CCP. while( worklist.size() ) { Node *n = worklist.pop(); + DEBUG_ONLY(worklist_verify.push(n);) const Type *t = n->Value(this); if (t != type(n)) { assert(ccp_type_widens(t, type(n)), "ccp type must widen"); @@ -1813,6 +1815,21 @@ void PhaseCCP::analyze() { } } } +#ifdef ASSERT + while (worklist_verify.size()) { + Node* n = worklist_verify.pop(); + const Type* told = type(n); + const Type* tnew = n->Value(this); + if (told != tnew) { + told->dump_on(tty); + tty->print_cr(""); + tnew->dump_on(tty); + tty->print_cr(""); + n->dump(1); + fatal("missed optimization opportunity"); + } + } +#endif }
|