< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page
rev 52443 : 8213489: GC/C2 abstraction for Compile::final_graph_reshaping()
rev 52444 : [mq]: JDK-8213489-1.patch

*** 2790,2799 **** --- 2790,2811 ---- assert(mb->trailing_membar()->leading_membar() == mb, "bad membar pair"); } } #endif // Count FPU ops and common calls, implements item (3) + bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->final_graph_reshaping(this, n, nop); + if (!gc_handled) { + final_graph_reshaping_main_switch(n, frc, nop); + } + + // Collect CFG split points + if (n->is_MultiBranch() && !n->is_RangeCheck()) { + frc._tests.push(n); + } + } + + void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& frc, uint nop) { switch( nop ) { // Count all float operations that may use FPU case Op_AddF: case Op_SubF: case Op_MulF:
*** 2936,2957 **** case Op_LoadNKlass: case Op_LoadL: case Op_LoadL_unaligned: case Op_LoadPLocked: case Op_LoadP: - #if INCLUDE_ZGC - case Op_LoadBarrierSlowReg: - case Op_LoadBarrierWeakSlowReg: - #endif case Op_LoadN: case Op_LoadRange: case Op_LoadS: { handle_mem: #ifdef ASSERT if( VerifyOptoOopOffsets ) { ! assert( n->is_Mem(), "" ); ! MemNode *mem = (MemNode*)n; // Check to see if address types have grounded out somehow. const TypeInstPtr *tp = mem->in(MemNode::Address)->bottom_type()->isa_instptr(); assert( !tp || oop_offset_is_sane(tp), "" ); } #endif --- 2948,2964 ---- case Op_LoadNKlass: case Op_LoadL: case Op_LoadL_unaligned: case Op_LoadPLocked: case Op_LoadP: case Op_LoadN: case Op_LoadRange: case Op_LoadS: { handle_mem: #ifdef ASSERT if( VerifyOptoOopOffsets ) { ! MemNode* mem = n->as_Mem(); // Check to see if address types have grounded out somehow. const TypeInstPtr *tp = mem->in(MemNode::Address)->bottom_type()->isa_instptr(); assert( !tp || oop_offset_is_sane(tp), "" ); } #endif
*** 3465,3484 **** n->subsume_by(cmp, this); } break; } default: ! assert( !n->is_Call(), "" ); ! assert( !n->is_Mem(), "" ); ! assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN"); break; } - - // Collect CFG split points - if (n->is_MultiBranch() && !n->is_RangeCheck()) { - frc._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. --- 3472,3486 ---- n->subsume_by(cmp, this); } break; } default: ! assert(!n->is_Call(), ""); ! assert(!n->is_Mem(), ""); ! assert(nop != Op_ProfileBoolean, "should be eliminated during IGVN"); 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.
< prev index next >