Skip to content

Commit f822eed

Browse files
committedJun 2, 2020
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
1 parent 5793b06 commit f822eed

13 files changed

+76
-80
lines changed
 

‎src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
459459
if (need_zero_check) {
460460
CodeEmitInfo* info = state_for(x);
461461
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0));
462-
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info));
462+
__ branch(lir_cond_equal, new DivByZeroStub(info));
463463
}
464464

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

540540
LIR_Opr ill = LIR_OprFact::illegalOpr;
@@ -1384,9 +1384,9 @@ void LIRGenerator::do_If(If* x) {
13841384
profile_branch(x, cond);
13851385
move_to_phi(x->state());
13861386
if (x->x()->type()->is_float_kind()) {
1387-
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
1387+
__ branch(lir_cond(cond), x->tsux(), x->usux());
13881388
} else {
1389-
__ branch(lir_cond(cond), right->type(), x->tsux());
1389+
__ branch(lir_cond(cond), x->tsux());
13901390
}
13911391
assert(x->default_sux() == x->fsux(), "wrong destination above");
13921392
__ jump(x->default_sux());

‎src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ void LIRGenerator::CardTableBarrierSet_post_barrier_helper(LIR_OprDesc* addr, LI
390390

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

545545

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

@@ -1285,9 +1285,9 @@ void LIRGenerator::do_If(If* x) {
12851285
profile_branch(x, cond);
12861286
move_to_phi(x->state());
12871287
if (x->x()->type()->is_float_kind()) {
1288-
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
1288+
__ branch(lir_cond(cond), x->tsux(), x->usux());
12891289
} else {
1290-
__ branch(lir_cond(cond), right->type(), x->tsux());
1290+
__ branch(lir_cond(cond), x->tsux());
12911291
}
12921292
assert(x->default_sux() == x->fsux(), "wrong destination above");
12931293
__ jump(x->default_sux());

‎src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
440440
if (divisor->is_register()) {
441441
CodeEmitInfo* null_check_info = state_for(x);
442442
__ cmp(lir_cond_equal, divisor, LIR_OprFact::longConst(0));
443-
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(null_check_info));
443+
__ branch(lir_cond_equal, new DivByZeroStub(null_check_info));
444444
} else {
445445
jlong const_divisor = divisor->as_constant_ptr()->as_jlong();
446446
if (const_divisor == 0) {
@@ -494,7 +494,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
494494
if (divisor->is_register()) {
495495
CodeEmitInfo* null_check_info = state_for(x);
496496
__ cmp(lir_cond_equal, divisor, LIR_OprFact::intConst(0));
497-
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(null_check_info));
497+
__ branch(lir_cond_equal, new DivByZeroStub(null_check_info));
498498
} else {
499499
jint const_divisor = divisor->as_constant_ptr()->as_jint();
500500
if (const_divisor == 0) {
@@ -1171,9 +1171,9 @@ void LIRGenerator::do_If(If* x) {
11711171
profile_branch(x, cond);
11721172
move_to_phi(x->state());
11731173
if (x->x()->type()->is_float_kind()) {
1174-
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
1174+
__ branch(lir_cond(cond), x->tsux(), x->usux());
11751175
} else {
1176-
__ branch(lir_cond(cond), right->type(), x->tsux());
1176+
__ branch(lir_cond(cond), x->tsux());
11771177
}
11781178
assert(x->default_sux() == x->fsux(), "wrong destination above");
11791179
__ jump(x->default_sux());

‎src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
385385

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

462462
if (!ImplicitDiv0Checks) {
463463
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
464-
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
464+
__ branch(lir_cond_equal, new DivByZeroStub(info));
465465
// Idiv/irem cannot trap (passing info would generate an assertion).
466466
info = NULL;
467467
}
@@ -988,9 +988,9 @@ void LIRGenerator::do_If (If* x) {
988988
profile_branch(x, cond);
989989
move_to_phi(x->state());
990990
if (x->x()->type()->is_float_kind()) {
991-
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
991+
__ branch(lir_cond(cond), x->tsux(), x->usux());
992992
} else {
993-
__ branch(lir_cond(cond), right->type(), x->tsux());
993+
__ branch(lir_cond(cond), x->tsux());
994994
}
995995
assert(x->default_sux() == x->fsux(), "wrong destination above");
996996
__ jump(x->default_sux());

‎src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
481481
__ move(right.result(), cc->at(0));
482482

483483
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::longConst(0));
484-
__ branch(lir_cond_equal, T_LONG, new DivByZeroStub(info));
484+
__ branch(lir_cond_equal, new DivByZeroStub(info));
485485

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

566566
if (!ImplicitDiv0Checks) {
567567
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
568-
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
568+
__ branch(lir_cond_equal, new DivByZeroStub(info));
569569
// Idiv/irem cannot trap (passing info would generate an assertion).
570570
info = NULL;
571571
}
@@ -1503,9 +1503,9 @@ void LIRGenerator::do_If(If* x) {
15031503
profile_branch(x, cond);
15041504
move_to_phi(x->state());
15051505
if (x->x()->type()->is_float_kind()) {
1506-
__ branch(lir_cond(cond), right->type(), x->tsux(), x->usux());
1506+
__ branch(lir_cond(cond), x->tsux(), x->usux());
15071507
} else {
1508-
__ branch(lir_cond(cond), right->type(), x->tsux());
1508+
__ branch(lir_cond(cond), x->tsux());
15091509
}
15101510
assert(x->default_sux() == x->fsux(), "wrong destination above");
15111511
__ jump(x->default_sux());

‎src/hotspot/share/c1/c1_LIR.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -236,30 +236,27 @@ void LIR_Op2::verify() const {
236236
}
237237

238238

239-
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block)
239+
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BlockBegin* block)
240240
: LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
241241
, _cond(cond)
242-
, _type(type)
243242
, _label(block->label())
244243
, _block(block)
245244
, _ublock(NULL)
246245
, _stub(NULL) {
247246
}
248247

249-
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, CodeStub* stub) :
248+
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, CodeStub* stub) :
250249
LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
251250
, _cond(cond)
252-
, _type(type)
253251
, _label(stub->entry())
254252
, _block(NULL)
255253
, _ublock(NULL)
256254
, _stub(stub) {
257255
}
258256

259-
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* ublock)
257+
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BlockBegin* block, BlockBegin* ublock)
260258
: LIR_Op(lir_cond_float_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*)NULL)
261259
, _cond(cond)
262-
, _type(type)
263260
, _label(block->label())
264261
, _block(block)
265262
, _ublock(ublock)
@@ -1403,7 +1400,7 @@ void LIR_List::null_check(LIR_Opr opr, CodeEmitInfo* info, bool deoptimize_on_nu
14031400
// Emit an explicit null check and deoptimize if opr is null
14041401
CodeStub* deopt = new DeoptimizeStub(info, Deoptimization::Reason_null_check, Deoptimization::Action_none);
14051402
cmp(lir_cond_equal, opr, LIR_OprFact::oopConst(NULL));
1406-
branch(lir_cond_equal, T_OBJECT, deopt);
1403+
branch(lir_cond_equal, deopt);
14071404
} else {
14081405
// Emit an implicit null check
14091406
append(new LIR_Op1(lir_null_check, opr, info));

‎src/hotspot/share/c1/c1_LIR.hpp

+18-19
Original file line numberDiff line numberDiff line change
@@ -1404,30 +1404,27 @@ class LIR_OpBranch: public LIR_Op {
14041404

14051405
private:
14061406
LIR_Condition _cond;
1407-
BasicType _type;
14081407
Label* _label;
14091408
BlockBegin* _block; // if this is a branch to a block, this is the block
14101409
BlockBegin* _ublock; // if this is a float-branch, this is the unorderd block
14111410
CodeStub* _stub; // if this is a branch to a stub, this is the stub
14121411

14131412
public:
1414-
LIR_OpBranch(LIR_Condition cond, BasicType type, Label* lbl)
1413+
LIR_OpBranch(LIR_Condition cond, Label* lbl)
14151414
: LIR_Op(lir_branch, LIR_OprFact::illegalOpr, (CodeEmitInfo*) NULL)
14161415
, _cond(cond)
1417-
, _type(type)
14181416
, _label(lbl)
14191417
, _block(NULL)
14201418
, _ublock(NULL)
14211419
, _stub(NULL) { }
14221420

1423-
LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block);
1424-
LIR_OpBranch(LIR_Condition cond, BasicType type, CodeStub* stub);
1421+
LIR_OpBranch(LIR_Condition cond, BlockBegin* block);
1422+
LIR_OpBranch(LIR_Condition cond, CodeStub* stub);
14251423

14261424
// for unordered comparisons
1427-
LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* ublock);
1425+
LIR_OpBranch(LIR_Condition cond, BlockBegin* block, BlockBegin* ublock);
14281426

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

21772174
// jump is an unconditional branch
21782175
void jump(BlockBegin* block) {
2179-
append(new LIR_OpBranch(lir_cond_always, T_ILLEGAL, block));
2176+
append(new LIR_OpBranch(lir_cond_always, block));
21802177
}
21812178
void jump(CodeStub* stub) {
2182-
append(new LIR_OpBranch(lir_cond_always, T_ILLEGAL, stub));
2179+
append(new LIR_OpBranch(lir_cond_always, stub));
2180+
}
2181+
void branch(LIR_Condition cond, Label* lbl) {
2182+
append(new LIR_OpBranch(cond, lbl));
21832183
}
2184-
void branch(LIR_Condition cond, BasicType type, Label* lbl) { append(new LIR_OpBranch(cond, type, lbl)); }
2185-
void branch(LIR_Condition cond, BasicType type, BlockBegin* block) {
2186-
assert(type != T_FLOAT && type != T_DOUBLE, "no fp comparisons");
2187-
append(new LIR_OpBranch(cond, type, block));
2184+
// Should not be used for fp comparisons
2185+
void branch(LIR_Condition cond, BlockBegin* block) {
2186+
append(new LIR_OpBranch(cond, block));
21882187
}
2189-
void branch(LIR_Condition cond, BasicType type, CodeStub* stub) {
2190-
assert(type != T_FLOAT && type != T_DOUBLE, "no fp comparisons");
2191-
append(new LIR_OpBranch(cond, type, stub));
2188+
// Should not be used for fp comparisons
2189+
void branch(LIR_Condition cond, CodeStub* stub) {
2190+
append(new LIR_OpBranch(cond, stub));
21922191
}
2193-
void branch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* unordered) {
2194-
assert(type == T_FLOAT || type == T_DOUBLE, "fp comparisons only");
2195-
append(new LIR_OpBranch(cond, type, block, unordered));
2192+
// Should only be used for fp comparisons
2193+
void branch(LIR_Condition cond, BlockBegin* block, BlockBegin* unordered) {
2194+
append(new LIR_OpBranch(cond, block, unordered));
21962195
}
21972196

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

0 commit comments

Comments
 (0)
Please sign in to comment.