Skip to content
Permalink
Browse files
8244595: [REDO] 8244523: Shenandoah: Remove null-handling in LRB expa…
…nsion

Reviewed-by: shade
  • Loading branch information
rkennke committed May 7, 2020
1 parent 441e4cd commit 1c136aae13a0d86a3668c2f3125ea508ea02a24f
@@ -481,16 +481,16 @@ const TypeFunc* ShenandoahBarrierSetC2::shenandoah_clone_barrier_Type() {
return TypeFunc::make(domain, range);
}

const TypeFunc* ShenandoahBarrierSetC2::shenandoah_load_reference_barrier_Type() {
const TypeFunc* ShenandoahBarrierSetC2::shenandoah_load_reference_barrier_Type(const Type* value_type) {
const Type **fields = TypeTuple::fields(2);
fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // original field value
fields[TypeFunc::Parms+0] = value_type; // original field value
fields[TypeFunc::Parms+1] = TypeRawPtr::BOTTOM; // original load address

const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2, fields);

// create result type (range)
fields = TypeTuple::fields(1);
fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL;
fields[TypeFunc::Parms+0] = value_type;
const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);

return TypeFunc::make(domain, range);
@@ -1059,37 +1059,10 @@ Node* ShenandoahBarrierSetC2::ideal_node(PhaseGVN* phase, Node* n, bool can_resh
}
}
}
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;
}
} else if (can_reshape &&
n->Opcode() == Op_If &&
ShenandoahBarrierC2Support::is_heap_stable_test(n) &&
n->in(0) != NULL) {
if (can_reshape &&
n->Opcode() == Op_If &&
ShenandoahBarrierC2Support::is_heap_stable_test(n) &&
n->in(0) != NULL) {
Node* dom = n->in(0);
Node* prev_dom = n;
int op = n->Opcode();
@@ -103,7 +103,7 @@ class ShenandoahBarrierSetC2 : public BarrierSetC2 {

static const TypeFunc* write_ref_field_pre_entry_Type();
static const TypeFunc* shenandoah_clone_barrier_Type();
static const TypeFunc* shenandoah_load_reference_barrier_Type();
static const TypeFunc* shenandoah_load_reference_barrier_Type(const Type* value_type);
virtual bool has_load_barrier_nodes() const { return true; }

// This is the entry-point for the backend to perform accesses through the Access API.

0 comments on commit 1c136aa

Please sign in to comment.