8228364: Shenandoah: Remove unused code from ShenandoahBarrierSetC1
Reviewed-by: shade
This commit is contained in:
parent
d35c1540e6
commit
6a746de90e
@ -99,7 +99,7 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp);
|
||||
|
||||
if (access.is_oop()) {
|
||||
result = load_reference_barrier(access.gen(), result, access.access_emit_info(), true);
|
||||
result = load_reference_barrier(access.gen(), result);
|
||||
if (ShenandoahSATBBarrier) {
|
||||
pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
|
||||
result /* pre_val */);
|
||||
|
@ -513,9 +513,7 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
|
||||
__ mov(res, obj);
|
||||
}
|
||||
// Check for null.
|
||||
if (stub->needs_null_check()) {
|
||||
__ cbz(res, done);
|
||||
}
|
||||
__ cbz(res, done);
|
||||
|
||||
load_reference_barrier_not_null(ce->masm(), res, rscratch1);
|
||||
|
||||
|
@ -110,7 +110,7 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
__ xchg(access.resolved_addr(), result, result, LIR_OprFact::illegalOpr);
|
||||
|
||||
if (access.is_oop()) {
|
||||
result = load_reference_barrier(access.gen(), result, access.access_emit_info(), true);
|
||||
result = load_reference_barrier(access.gen(), result);
|
||||
if (ShenandoahSATBBarrier) {
|
||||
pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
|
||||
result /* pre_val */);
|
||||
|
@ -880,10 +880,8 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
|
||||
}
|
||||
|
||||
// Check for null.
|
||||
if (stub->needs_null_check()) {
|
||||
__ testptr(res, res);
|
||||
__ jcc(Assembler::zero, done);
|
||||
}
|
||||
__ testptr(res, res);
|
||||
__ jcc(Assembler::zero, done);
|
||||
|
||||
load_reference_barrier_not_null(ce->masm(), res);
|
||||
|
||||
|
@ -101,15 +101,15 @@ void ShenandoahBarrierSetC1::pre_barrier(LIRGenerator* gen, CodeEmitInfo* info,
|
||||
__ branch_destination(slow->continuation());
|
||||
}
|
||||
|
||||
LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, bool need_null_check) {
|
||||
LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier(LIRGenerator* gen, LIR_Opr obj) {
|
||||
if (ShenandoahLoadRefBarrier) {
|
||||
return load_reference_barrier_impl(gen, obj, info, need_null_check);
|
||||
return load_reference_barrier_impl(gen, obj);
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier_impl(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, bool need_null_check) {
|
||||
LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier_impl(LIRGenerator* gen, LIR_Opr obj) {
|
||||
assert(ShenandoahLoadRefBarrier, "Should be enabled");
|
||||
|
||||
obj = ensure_in_register(gen, obj);
|
||||
@ -140,7 +140,7 @@ LIR_Opr ShenandoahBarrierSetC1::load_reference_barrier_impl(LIRGenerator* gen, L
|
||||
}
|
||||
__ cmp(lir_cond_notEqual, flag_val, LIR_OprFact::intConst(0));
|
||||
|
||||
CodeStub* slow = new ShenandoahLoadReferenceBarrierStub(obj, result, info ? new CodeEmitInfo(info) : NULL, need_null_check);
|
||||
CodeStub* slow = new ShenandoahLoadReferenceBarrierStub(obj, result);
|
||||
__ branch(lir_cond_notEqual, T_INT, slow);
|
||||
__ branch_destination(slow->continuation());
|
||||
|
||||
@ -204,7 +204,7 @@ void ShenandoahBarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result)
|
||||
if (ShenandoahLoadRefBarrier) {
|
||||
LIR_Opr tmp = gen->new_register(T_OBJECT);
|
||||
BarrierSetC1::load_at_resolved(access, tmp);
|
||||
tmp = load_reference_barrier(access.gen(), tmp, access.access_emit_info(), true);
|
||||
tmp = load_reference_barrier(access.gen(), tmp);
|
||||
__ move(tmp, result);
|
||||
} else {
|
||||
BarrierSetC1::load_at_resolved(access, result);
|
||||
|
@ -90,12 +90,10 @@ class ShenandoahLoadReferenceBarrierStub: public CodeStub {
|
||||
private:
|
||||
LIR_Opr _obj;
|
||||
LIR_Opr _result;
|
||||
CodeEmitInfo* _info;
|
||||
bool _needs_null_check;
|
||||
|
||||
public:
|
||||
ShenandoahLoadReferenceBarrierStub(LIR_Opr obj, LIR_Opr result, CodeEmitInfo* info, bool needs_null_check) :
|
||||
_obj(obj), _result(result), _info(info), _needs_null_check(needs_null_check)
|
||||
ShenandoahLoadReferenceBarrierStub(LIR_Opr obj, LIR_Opr result) :
|
||||
_obj(obj), _result(result)
|
||||
{
|
||||
assert(_obj->is_register(), "should be register");
|
||||
assert(_result->is_register(), "should be register");
|
||||
@ -103,8 +101,6 @@ public:
|
||||
|
||||
LIR_Opr obj() const { return _obj; }
|
||||
LIR_Opr result() const { return _result; }
|
||||
CodeEmitInfo* info() const { return _info; }
|
||||
bool needs_null_check() const { return _needs_null_check; }
|
||||
|
||||
virtual void emit_code(LIR_Assembler* e);
|
||||
virtual void visit(LIR_OpVisitState* visitor) {
|
||||
@ -181,10 +177,10 @@ private:
|
||||
|
||||
void pre_barrier(LIRGenerator* gen, CodeEmitInfo* info, DecoratorSet decorators, LIR_Opr addr_opr, LIR_Opr pre_val);
|
||||
|
||||
LIR_Opr load_reference_barrier(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, bool need_null_check);
|
||||
LIR_Opr load_reference_barrier(LIRGenerator* gen, LIR_Opr obj);
|
||||
LIR_Opr storeval_barrier(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, DecoratorSet decorators);
|
||||
|
||||
LIR_Opr load_reference_barrier_impl(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, bool need_null_check);
|
||||
LIR_Opr load_reference_barrier_impl(LIRGenerator* gen, LIR_Opr obj);
|
||||
|
||||
LIR_Opr ensure_in_register(LIRGenerator* gen, LIR_Opr obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user