< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp

Print this page
rev 53156 : Use BarrierSetC2::ideal_node() API for CmpPNode::Ideal()

*** 1007,1016 **** --- 1007,1045 ---- } return n; } } } + if (n->Opcode() == Op_CmpP) { + Node* in1 = n->in(1); + Node* in2 = n->in(2); + if (in1->bottom_type() == TypePtr::NULL_PTR) { + in2 = step_over_gc_barrier(in2); + } + if (in2->bottom_type() == TypePtr::NULL_PTR) { + in1 = step_over_gc_barrier(in1); + } + PhaseIterGVN* igvn = phase->is_IterGVN(); + if (in1 != n->in(1)) { + if (igvn != NULL) { + n->set_req_X(1, in1, igvn); + } else { + n->set_req(1, in1); + } + assert(in2 == n->in(2), "only one change"); + return n; + } + if (in2 != n->in(2)) { + if (igvn != NULL) { + n->set_req_X(2, in2, igvn); + } else { + n->set_req(2, in2); + } + return n; + } + } + return NULL; } bool ShenandoahBarrierSetC2::has_only_shenandoah_wb_pre_uses(Node* n) { for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
< prev index next >