< prev index next >

src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp

Print this page
rev 52443 : 8213489: GC/C2 abstraction for Compile::final_graph_reshaping()

*** 1433,1442 **** --- 1433,1465 ---- bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { return type == T_OBJECT || type == T_ARRAY; } + bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const { + bool handled; + switch (n->Opcode()) { + case Op_LoadBarrierSlowReg: + case Op_LoadBarrierWeakSlowReg: + #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(); + ciInstanceKlass* k = tp->klass()->as_instance_klass(); + bool oop_offset_is_sane = k->contains_field_offset(tp->offset()); + assert(!tp || oop_offset_is_sane, ""); + } + #endif + handled = true; + break; + default: + handled = false; + } + return handled; + } + // == Verification == #ifdef ASSERT static bool look_for_barrier(Node* n, bool post_parse, VectorSet& visited) {
< prev index next >