Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8245957: Remove unused LIR_OpBranch::type after SPARC port removal
Removed LIR_OpBranch::type after the only remaining usage was removed with the SPARC port removal.

Reviewed-by: kvn, mdoerr
  • Loading branch information
TobiHartmann committed Jun 2, 2020
1 parent 5793b06 commit f822eed55c7678f47f00c725ff6462b7da467ff5
@@ -459,7 +459,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
if (need_zero_check) {
CodeEmitInfo* info = state_for(x);
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0));
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
}

rlock_result(x);
@@ -534,7 +534,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
if (need_zero_check) {
CodeEmitInfo* info = state_for(x);
__ cmp(lir_cond_equal, right_arg->result(), LIR_OprFact::longConst(0));
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
}

LIR_Opr ill = LIR_OprFact::illegalOpr;
@@ -1384,9 +1384,9 @@ void LIRGenerator::do_If(If* x) {
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
__ branch(lir_cond(cond), x->tsux(), x->usux());
} else {
__ branch(lir_cond(cond), right->type(), x->tsux());
__ branch(lir_cond(cond), x->tsux());
}
assert(x->default_sux() == x->fsux(), "wrong destination above");
__ jump(x->default_sux());
@@ -390,7 +390,7 @@ void LIRGenerator::CardTableBarrierSet_post_barrier_helper(LIR_OprDesc* addr, LI

LabelObj* L_already_dirty = new LabelObj();
__ cmp(lir_cond_equal, cur_value, LIR_OprFact::intConst(CardTable::dirty_card_val()));
__ branch(lir_cond_equal, T_BYTE, L_already_dirty->label());
__ branch(lir_cond_equal, L_already_dirty->label());
set_card(tmp, card_addr);
__ branch_destination(L_already_dirty->label());
} else {
@@ -539,7 +539,7 @@ void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
void LIRGenerator::make_div_by_zero_check(LIR_Opr right_arg, BasicType type, CodeEmitInfo* info) {
assert(right_arg->is_register(), "must be");
__ cmp(lir_cond_equal, right_arg, make_constant(type, 0));
__ branch(lir_cond_equal, type, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
}


@@ -1227,7 +1227,7 @@ void LIRGenerator::do_soft_float_compare(If* x) {
LIR_OprFact::intConst(0) : LIR_OprFact::intConst(1));
profile_branch(x, cond);
move_to_phi(x->state());
__ branch(lir_cond_equal, T_INT, x->tsux());
__ branch(lir_cond_equal, x->tsux());
}
#endif // __SOFTFP__

@@ -1285,9 +1285,9 @@ void LIRGenerator::do_If(If* x) {
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
__ branch(lir_cond(cond), x->tsux(), x->usux());
} else {
__ branch(lir_cond(cond), right->type(), x->tsux());
__ branch(lir_cond(cond), x->tsux());
}
assert(x->default_sux() == x->fsux(), "wrong destination above");
__ jump(x->default_sux());
@@ -440,7 +440,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
if (divisor->is_register()) {
CodeEmitInfo* null_check_info = state_for(x);
__ cmp(lir_cond_equal, divisor, LIR_OprFact::longConst(0));
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(null_check_info));
__ branch(lir_cond_equal, new DivByZeroStub(null_check_info));
} else {
jlong const_divisor = divisor->as_constant_ptr()->as_jlong();
if (const_divisor == 0) {
@@ -494,7 +494,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
if (divisor->is_register()) {
CodeEmitInfo* null_check_info = state_for(x);
__ cmp(lir_cond_equal, divisor, LIR_OprFact::intConst(0));
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(null_check_info));
__ branch(lir_cond_equal, new DivByZeroStub(null_check_info));
} else {
jint const_divisor = divisor->as_constant_ptr()->as_jint();
if (const_divisor == 0) {
@@ -1171,9 +1171,9 @@ void LIRGenerator::do_If(If* x) {
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
__ branch(lir_cond(cond), x->tsux(), x->usux());
} else {
__ branch(lir_cond(cond), right->type(), x->tsux());
__ branch(lir_cond(cond), x->tsux());
}
assert(x->default_sux() == x->fsux(), "wrong destination above");
__ jump(x->default_sux());
@@ -385,7 +385,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {

if (!ImplicitDiv0Checks) {
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0));
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
// Idiv/irem cannot trap (passing info would generate an assertion).
info = NULL;
}
@@ -461,7 +461,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {

if (!ImplicitDiv0Checks) {
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
// Idiv/irem cannot trap (passing info would generate an assertion).
info = NULL;
}
@@ -988,9 +988,9 @@ void LIRGenerator::do_If (If* x) {
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
__ branch(lir_cond(cond), x->tsux(), x->usux());
} else {
__ branch(lir_cond(cond), right->type(), x->tsux());
__ branch(lir_cond(cond), x->tsux());
}
assert(x->default_sux() == x->fsux(), "wrong destination above");
__ jump(x->default_sux());
@@ -481,7 +481,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
__ move(right.result(), cc->at(0));

__ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0));
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));

address entry = NULL;
switch (x->op()) {
@@ -565,7 +565,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {

if (!ImplicitDiv0Checks) {
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
__ branch(lir_cond_equal, new DivByZeroStub(info));
// Idiv/irem cannot trap (passing info would generate an assertion).
info = NULL;
}
@@ -1503,9 +1503,9 @@ void LIRGenerator::do_If(If* x) {
profile_branch(x, cond);
move_to_phi(x->state());
if (x->x()->type()->is_float_kind()) {
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
__ branch(lir_cond(cond), x->tsux(), x->usux());
} else {
__ branch(lir_cond(cond), right->type(), x->tsux());
__ branch(lir_cond(cond), x->tsux());
}
assert(x->default_sux() == x->fsux(), "wrong destination above");
__ jump(x->default_sux());
@@ -236,30 +236,27 @@ void LIR_Op2::verify() const {
}


LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block)
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BlockBegin* block)
: LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
, _cond(cond)
, _type(type)
, _label(block->label())
, _block(block)
, _ublock(NULL)
, _stub(NULL) {
}

LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, CodeStub* stub) :
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, CodeStub* stub) :
LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
, _cond(cond)
, _type(type)
, _label(stub->entry())
, _block(NULL)
, _ublock(NULL)
, _stub(stub) {
}

LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* ublock)
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BlockBegin* block, BlockBegin* ublock)
: LIR_Op(lir_cond_float_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
, _cond(cond)
, _type(type)
, _label(block->label())
, _block(block)
, _ublock(ublock)
@@ -1403,7 +1400,7 @@ void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_nu
// Emit an explicit null check and deoptimize if opr is null
CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
branch(lir_cond_equal, T_OBJECT, deopt);
branch(lir_cond_equal, deopt);
} else {
// Emit an implicit null check
append(new LIR_Op1(lir_null_check, opr, info));
@@ -1404,30 +1404,27 @@ class LIR_OpBranch: public LIR_Op {

private:
LIR_Condition _cond;
BasicType _type;
Label* _label;
BlockBegin* _block; // if this is a branch to a block, this is the block
BlockBegin* _ublock; // if this is a float-branch, this is the unorderd block
CodeStub* _stub; // if this is a branch to a stub, this is the stub

public:
LIR_OpBranch(LIR_Condition cond, BasicType type, Label* lbl)
LIR_OpBranch(LIR_Condition cond, Label* lbl)
: LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*) NULL)
, _cond(cond)
, _type(type)
, _label(lbl)
, _block(NULL)
, _ublock(NULL)
, _stub(NULL) { }

LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block);
LIR_OpBranch(LIR_Condition cond, BasicType type, CodeStub* stub);
LIR_OpBranch(LIR_Condition cond, BlockBegin* block);
LIR_OpBranch(LIR_Condition cond, CodeStub* stub);

// for unordered comparisons
LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* ublock);
LIR_OpBranch(LIR_Condition cond, BlockBegin* block, BlockBegin* ublock);

LIR_Condition cond() const { return _cond; }
BasicType type() const { return _type; }
Label* label() const { return _label; }
BlockBegin* block() const { return _block; }
BlockBegin* ublock() const { return _ublock; }
@@ -2176,23 +2173,25 @@ class LIR_List: public CompilationResourceObj {

// jump is an unconditional branch
void jump(BlockBegin* block) {
append(new LIR_OpBranch(lir_cond_always, T_ILLEGAL, block));
append(new LIR_OpBranch(lir_cond_always, block));
}
void jump(CodeStub* stub) {
append(new LIR_OpBranch(lir_cond_always, T_ILLEGAL, stub));
append(new LIR_OpBranch(lir_cond_always, stub));
}
void branch(LIR_Condition cond, Label* lbl) {
append(new LIR_OpBranch(cond, lbl));
}
void branch(LIR_Condition cond, BasicType type, Label* lbl) { append(new LIR_OpBranch(cond, type, lbl)); }
void branch(LIR_Condition cond, BasicType type, BlockBegin* block) {
assert(type != T_FLOAT && type != T_DOUBLE, "no fp comparisons");
append(new LIR_OpBranch(cond, type, block));
// Should not be used for fp comparisons
void branch(LIR_Condition cond, BlockBegin* block) {
append(new LIR_OpBranch(cond, block));
}
void branch(LIR_Condition cond, BasicType type, CodeStub* stub) {
assert(type != T_FLOAT && type != T_DOUBLE, "no fp comparisons");
append(new LIR_OpBranch(cond, type, stub));
// Should not be used for fp comparisons
void branch(LIR_Condition cond, CodeStub* stub) {
append(new LIR_OpBranch(cond, stub));
}
void branch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* unordered) {
assert(type == T_FLOAT || type == T_DOUBLE, "fp comparisons only");
append(new LIR_OpBranch(cond, type, block, unordered));
// Should only be used for fp comparisons
void branch(LIR_Condition cond, BlockBegin* block, BlockBegin* unordered) {
append(new LIR_OpBranch(cond, block, unordered));
}

void shift_left(LIR_Opr value, LIR_Opr count, LIR_Opr dst, LIR_Opr tmp);

0 comments on commit f822eed

Please sign in to comment.