src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6663848 Cdiff src/share/vm/opto/compile.cpp

src/share/vm/opto/compile.cpp

Print this page

        

*** 1979,1992 **** assert( !tp || oop_offset_is_sane(tp), "" ); } #endif break; } - case Op_If: - case Op_CountedLoopEnd: - fpu._tests.push(n); // Collect CFG split points - break; case Op_AddP: { // Assert sane base pointers const Node *addp = n->in(AddPNode::Address); assert( !addp->is_AddP() || addp->in(AddPNode::Base)->is_top() || // Top OK for allocation --- 1979,1988 ----
*** 2081,2094 **** } break; default: assert( !n->is_Call(), "" ); assert( !n->is_Mem(), "" ); - if( n->is_If() || n->is_PCTable() ) - fpu._tests.push(n); // Collect CFG split points break; } } //------------------------------final_graph_reshaping_walk--------------------- // Replacing Opaque nodes with their input in final_graph_reshaping_impl(), // requires that the walk visits a node's inputs before visiting the node. --- 2077,2092 ---- } break; default: assert( !n->is_Call(), "" ); assert( !n->is_Mem(), "" ); break; } + + // Collect CFG split points + if (n->is_MultiBranch()) + fpu._tests.push(n); } //------------------------------final_graph_reshaping_walk--------------------- // Replacing Opaque nodes with their input in final_graph_reshaping_impl(), // requires that the walk visits a node's inputs before visiting the node.
*** 2163,2195 **** Node_Stack nstack(unique() >> 1); final_graph_reshaping_walk(nstack, root(), fpu); // Check for unreachable (from below) code (i.e., infinite loops). for( uint i = 0; i < fpu._tests.size(); i++ ) { ! Node *n = fpu._tests[i]; ! assert( n->is_PCTable() || n->is_If(), "either PCTables or IfNodes" ); ! // Get number of CFG targets; 2 for IfNodes or _size for PCTables. // Note that PCTables include exception targets after calls. ! uint expected_kids = n->is_PCTable() ? n->as_PCTable()->_size : 2; ! if (n->outcnt() != expected_kids) { // Check for a few special cases. Rethrow Nodes never take the // 'fall-thru' path, so expected kids is 1 less. if (n->is_PCTable() && n->in(0) && n->in(0)->in(0)) { if (n->in(0)->in(0)->is_Call()) { CallNode *call = n->in(0)->in(0)->as_Call(); if (call->entry_point() == OptoRuntime::rethrow_stub()) { ! expected_kids--; // Rethrow always has 1 less kid } else if (call->req() > TypeFunc::Parms && call->is_CallDynamicJava()) { // Check for null receiver. In such case, the optimizer has // detected that the virtual call will always result in a null // pointer exception. The fall-through projection of this CatchNode // will not be populated. Node *arg0 = call->in(TypeFunc::Parms); if (arg0->is_Type() && arg0->as_Type()->type()->higher_equal(TypePtr::NULL_PTR)) { ! expected_kids--; } } else if (call->entry_point() == OptoRuntime::new_array_Java() && call->req() > TypeFunc::Parms+1 && call->is_CallStaticJava()) { // Check for negative array length. In such case, the optimizer has --- 2161,2192 ---- Node_Stack nstack(unique() >> 1); final_graph_reshaping_walk(nstack, root(), fpu); // Check for unreachable (from below) code (i.e., infinite loops). for( uint i = 0; i < fpu._tests.size(); i++ ) { ! MultiBranchNode *n = fpu._tests[i]->as_MultiBranch(); ! // Get number of CFG targets. // Note that PCTables include exception targets after calls. ! uint required_outcnt = n->required_outcnt(); ! if (n->outcnt() != required_outcnt) { // Check for a few special cases. Rethrow Nodes never take the // 'fall-thru' path, so expected kids is 1 less. if (n->is_PCTable() && n->in(0) && n->in(0)->in(0)) { if (n->in(0)->in(0)->is_Call()) { CallNode *call = n->in(0)->in(0)->as_Call(); if (call->entry_point() == OptoRuntime::rethrow_stub()) { ! required_outcnt--; // Rethrow always has 1 less kid } else if (call->req() > TypeFunc::Parms && call->is_CallDynamicJava()) { // Check for null receiver. In such case, the optimizer has // detected that the virtual call will always result in a null // pointer exception. The fall-through projection of this CatchNode // will not be populated. Node *arg0 = call->in(TypeFunc::Parms); if (arg0->is_Type() && arg0->as_Type()->type()->higher_equal(TypePtr::NULL_PTR)) { ! required_outcnt--; } } else if (call->entry_point() == OptoRuntime::new_array_Java() && call->req() > TypeFunc::Parms+1 && call->is_CallStaticJava()) { // Check for negative array length. In such case, the optimizer has
*** 2196,2212 **** // detected that the allocation attempt will always result in an // exception. There is no fall-through projection of this CatchNode . Node *arg1 = call->in(TypeFunc::Parms+1); if (arg1->is_Type() && arg1->as_Type()->type()->join(TypeInt::POS)->empty()) { ! expected_kids--; } } } } ! // Recheck with a better notion of 'expected_kids' ! if (n->outcnt() != expected_kids) { record_method_not_compilable("malformed control flow"); return true; // Not all targets reachable! } } // Check that I actually visited all kids. Unreached kids --- 2193,2209 ---- // detected that the allocation attempt will always result in an // exception. There is no fall-through projection of this CatchNode . Node *arg1 = call->in(TypeFunc::Parms+1); if (arg1->is_Type() && arg1->as_Type()->type()->join(TypeInt::POS)->empty()) { ! required_outcnt--; } } } } ! // Recheck with a better notion of 'required_outcnt' ! if (n->outcnt() != required_outcnt) { record_method_not_compilable("malformed control flow"); return true; // Not all targets reachable! } } // Check that I actually visited all kids. Unreached kids
src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File