< prev index next > src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
Print this page
src, dest, length
LP64_ONLY(COMMA phase->top()));
call = phase->transform_later(call);
// Hook up the whole thing into the graph
! phase->igvn().replace_node(ac, call);
} else {
BarrierSetC2::clone_at_expansion(phase, ac);
}
}
src, dest, length
LP64_ONLY(COMMA phase->top()));
call = phase->transform_later(call);
// Hook up the whole thing into the graph
! phase->replace_node(ac, call);
} else {
BarrierSetC2::clone_at_expansion(phase, ac);
}
}
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
state()->remove_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
}
}
! void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const {
if (is_shenandoah_wb_pre_call(node)) {
! shenandoah_eliminate_wb_pre(node, ¯o->igvn());
}
if (ShenandoahCardBarrier && node->Opcode() == Op_CastP2X) {
Node* shift = node->unique_out();
Node* addp = shift->unique_out();
for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) {
Node* mem = addp->last_out(j);
if (UseCondCardMark && mem->is_Load()) {
assert(mem->Opcode() == Op_LoadB, "unexpected code shape");
// The load is checking if the card has been written so
// replace it with zero to fold the test.
! macro->replace_node(mem, macro->intcon(0));
continue;
}
assert(mem->is_Store(), "store required");
! macro->replace_node(mem, mem->in(MemNode::Memory));
}
}
}
void ShenandoahBarrierSetC2::shenandoah_eliminate_wb_pre(Node* call, PhaseIterGVN* igvn) const {
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
state()->remove_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
}
}
! void ShenandoahBarrierSetC2::eliminate_gc_barrier(PhaseIterGVN* igvn, Node* node) const {
if (is_shenandoah_wb_pre_call(node)) {
! shenandoah_eliminate_wb_pre(node, igvn);
}
if (ShenandoahCardBarrier && node->Opcode() == Op_CastP2X) {
Node* shift = node->unique_out();
Node* addp = shift->unique_out();
for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) {
Node* mem = addp->last_out(j);
if (UseCondCardMark && mem->is_Load()) {
assert(mem->Opcode() == Op_LoadB, "unexpected code shape");
// The load is checking if the card has been written so
// replace it with zero to fold the test.
! igvn->replace_node(mem, igvn->intcon(0));
continue;
}
assert(mem->is_Store(), "store required");
! igvn->replace_node(mem, mem->in(MemNode::Memory));
}
}
}
void ShenandoahBarrierSetC2::shenandoah_eliminate_wb_pre(Node* call, PhaseIterGVN* igvn) const {
}
#endif
Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const {
if (is_shenandoah_wb_pre_call(n)) {
! uint cnt = ShenandoahBarrierSetC2::write_barrier_pre_Type()->domain()->cnt();
if (n->req() > cnt) {
Node* addp = n->in(cnt);
if (has_only_shenandoah_wb_pre_uses(addp)) {
n->del_req(cnt);
if (can_reshape) {
}
#endif
Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const {
if (is_shenandoah_wb_pre_call(n)) {
! uint cnt = ShenandoahBarrierSetC2::write_barrier_pre_Type()->domain_sig()->cnt();
if (n->req() > cnt) {
Node* addp = n->in(cnt);
if (has_only_shenandoah_wb_pre_uses(addp)) {
n->del_req(cnt);
if (can_reshape) {
case Op_CallLeaf:
case Op_CallLeafNoFP: {
assert (n->is_Call(), "");
CallNode *call = n->as_Call();
if (ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(call)) {
! uint cnt = ShenandoahBarrierSetC2::write_barrier_pre_Type()->domain()->cnt();
if (call->req() > cnt) {
assert(call->req() == cnt + 1, "only one extra input");
Node *addp = call->in(cnt);
assert(!ShenandoahBarrierSetC2::has_only_shenandoah_wb_pre_uses(addp), "useless address computation?");
call->del_req(cnt);
case Op_CallLeaf:
case Op_CallLeafNoFP: {
assert (n->is_Call(), "");
CallNode *call = n->as_Call();
if (ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call(call)) {
! uint cnt = ShenandoahBarrierSetC2::write_barrier_pre_Type()->domain_sig()->cnt();
if (call->req() > cnt) {
assert(call->req() == cnt + 1, "only one extra input");
Node *addp = call->in(cnt);
assert(!ShenandoahBarrierSetC2::has_only_shenandoah_wb_pre_uses(addp), "useless address computation?");
call->del_req(cnt);
< prev index next >