Skip to content

Commit 2d4d850

Browse files
zhengxiaolinXTobiHartmann
authored andcommittedMay 24, 2023
8308091: Remove unused iRegIHeapbase() matching operand
Reviewed-by: fyang, thartmann
1 parent b7a84b0 commit 2d4d850

File tree

2 files changed

+8
-39
lines changed

2 files changed

+8
-39
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

+4-20
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,6 @@ reg_class method_reg(
664664
R12, R12_H
665665
);
666666

667-
// Class for heapbase register
668-
reg_class heapbase_reg(
669-
R27, R27_H
670-
);
671-
672667
// Class for thread register
673668
reg_class thread_reg(
674669
R28, R28_H
@@ -1244,15 +1239,15 @@ source %{
12441239
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
12451240
if (UseCompressedOops && (CompressedOops::ptrs_base() != NULL)) {
12461241
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
1247-
_NO_SPECIAL_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1248-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1242+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
1243+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12491244
}
12501245

12511246
// r29 is not allocatable when PreserveFramePointer is on
12521247
if (PreserveFramePointer) {
12531248
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
1254-
_NO_SPECIAL_REG_mask.SUBTRACT(_FP_REG_mask);
1255-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_FP_REG_mask);
1249+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
1250+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
12561251
}
12571252
}
12581253

@@ -5320,17 +5315,6 @@ operand iRegNNoSp()
53205315
interface(REG_INTER);
53215316
%}
53225317

5323-
// heap base register -- used for encoding immN0
5324-
5325-
operand iRegIHeapbase()
5326-
%{
5327-
constraint(ALLOC_IN_RC(heapbase_reg));
5328-
match(RegI);
5329-
op_cost(0);
5330-
format %{ %}
5331-
interface(REG_INTER);
5332-
%}
5333-
53345318
// Float Register
53355319
// Float register operands
53365320
operand vRegF()

‎src/hotspot/cpu/riscv/riscv.ad

+4-19
Original file line numberDiff line numberDiff line change
@@ -705,11 +705,6 @@ reg_class method_reg(
705705
R31, R31_H
706706
);
707707

708-
// Class for heapbase register
709-
reg_class heapbase_reg(
710-
R27, R27_H
711-
);
712-
713708
// Class for java thread register
714709
reg_class java_thread_reg(
715710
R23, R23_H
@@ -1077,15 +1072,15 @@ void reg_mask_init() {
10771072
// x27 is not allocatable when compressed oops is on
10781073
if (UseCompressedOops) {
10791074
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(x27->as_VMReg()));
1080-
_NO_SPECIAL_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1081-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
1075+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(x27->as_VMReg()));
1076+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(x27->as_VMReg()));
10821077
}
10831078

10841079
// x8 is not allocatable when PreserveFramePointer is on
10851080
if (PreserveFramePointer) {
10861081
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(x8->as_VMReg()));
1087-
_NO_SPECIAL_REG_mask.SUBTRACT(_FP_REG_mask);
1088-
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_FP_REG_mask);
1082+
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(x8->as_VMReg()));
1083+
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(x8->as_VMReg()));
10891084
}
10901085
}
10911086

@@ -3507,16 +3502,6 @@ operand iRegNNoSp()
35073502
interface(REG_INTER);
35083503
%}
35093504

3510-
// heap base register -- used for encoding immN0
3511-
operand iRegIHeapbase()
3512-
%{
3513-
constraint(ALLOC_IN_RC(heapbase_reg));
3514-
match(RegI);
3515-
op_cost(0);
3516-
format %{ %}
3517-
interface(REG_INTER);
3518-
%}
3519-
35203505
// Long 64 bit Register R10 only
35213506
operand iRegL_R10()
35223507
%{

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on May 24, 2023

@openjdk-notifier[bot]
Please sign in to comment.