Skip to content

Commit 24f67d0

Browse files
Neethu PrasadVladimir Kozlov
authored andcommitted
8334232: Optimize C1 classes layout
Reviewed-by: phh, kvn
1 parent 021c2c3 commit 24f67d0

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

src/hotspot/share/c1/c1_Instruction.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ class Instruction: public CompilationResourceObj {
281281
#endif
282282
int _use_count; // the number of instructions referring to this value (w/o prev/next); only roots can have use count = 0 or > 1
283283
int _pin_state; // set of PinReason describing the reason for pinning
284+
unsigned int _flags; // Flag bits
284285
ValueType* _type; // the instruction value type
285286
Instruction* _next; // the next instruction if any (null for BlockEnd instructions)
286287
Instruction* _subst; // the substitution instruction if any
287288
LIR_Opr _operand; // LIR specific information
288-
unsigned int _flags; // Flag bits
289289

290290
ValueStack* _state_before; // Copy of state with input operands still on stack (or null)
291291
ValueStack* _exception_state; // Copy of state for exception handling
@@ -403,11 +403,11 @@ class Instruction: public CompilationResourceObj {
403403
#endif
404404
_use_count(0)
405405
, _pin_state(0)
406+
, _flags(0)
406407
, _type(type)
407408
, _next(nullptr)
408409
, _subst(nullptr)
409410
, _operand(LIR_OprFact::illegalOpr)
410-
, _flags(0)
411411
, _state_before(state_before)
412412
, _exception_handlers(nullptr)
413413
, _block(nullptr)
@@ -1518,9 +1518,9 @@ LEAF(MonitorExit, AccessMonitor)
15181518
LEAF(Intrinsic, StateSplit)
15191519
private:
15201520
vmIntrinsics::ID _id;
1521+
ArgsNonNullState _nonnull_state;
15211522
Values* _args;
15221523
Value _recv;
1523-
ArgsNonNullState _nonnull_state;
15241524

15251525
public:
15261526
// preserves_state can be set to true for Intrinsics

src/hotspot/share/c1/c1_LIR.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object,
296296
, _tmp1(tmp1)
297297
, _tmp2(tmp2)
298298
, _tmp3(tmp3)
299-
, _fast_check(fast_check)
300299
, _info_for_patch(info_for_patch)
301300
, _info_for_exception(info_for_exception)
302301
, _stub(stub)
303302
, _profiled_method(nullptr)
304303
, _profiled_bci(-1)
305304
, _should_profile(false)
305+
, _fast_check(fast_check)
306306
{
307307
if (code == lir_checkcast) {
308308
assert(info_for_exception != nullptr, "checkcast throws exceptions");
@@ -323,13 +323,13 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, L
323323
, _tmp1(tmp1)
324324
, _tmp2(tmp2)
325325
, _tmp3(tmp3)
326-
, _fast_check(false)
327326
, _info_for_patch(nullptr)
328327
, _info_for_exception(info_for_exception)
329328
, _stub(nullptr)
330329
, _profiled_method(nullptr)
331330
, _profiled_bci(-1)
332331
, _should_profile(false)
332+
, _fast_check(false)
333333
{
334334
if (code == lir_store_check) {
335335
_stub = new ArrayStoreExceptionStub(object, info_for_exception);

src/hotspot/share/c1/c1_LIR.hpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -528,44 +528,44 @@ class LIR_Address: public LIR_OprPtr {
528528
private:
529529
LIR_Opr _base;
530530
LIR_Opr _index;
531-
Scale _scale;
532531
intx _disp;
532+
Scale _scale;
533533
BasicType _type;
534534

535535
public:
536536
LIR_Address(LIR_Opr base, LIR_Opr index, BasicType type):
537537
_base(base)
538538
, _index(index)
539-
, _scale(times_1)
540539
, _disp(0)
540+
, _scale(times_1)
541541
, _type(type) { verify(); }
542542

543543
LIR_Address(LIR_Opr base, intx disp, BasicType type):
544544
_base(base)
545545
, _index(LIR_Opr::illegalOpr())
546-
, _scale(times_1)
547546
, _disp(disp)
547+
, _scale(times_1)
548548
, _type(type) { verify(); }
549549

550550
LIR_Address(LIR_Opr base, BasicType type):
551551
_base(base)
552552
, _index(LIR_Opr::illegalOpr())
553-
, _scale(times_1)
554553
, _disp(0)
554+
, _scale(times_1)
555555
, _type(type) { verify(); }
556556

557557
LIR_Address(LIR_Opr base, LIR_Opr index, intx disp, BasicType type):
558558
_base(base)
559559
, _index(index)
560-
, _scale(times_1)
561560
, _disp(disp)
561+
, _scale(times_1)
562562
, _type(type) { verify(); }
563563

564564
LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type):
565565
_base(base)
566566
, _index(index)
567-
, _scale(scale)
568567
, _disp(disp)
568+
, _scale(scale)
569569
, _type(type) { verify(); }
570570

571571
LIR_Opr base() const { return _base; }
@@ -1544,13 +1544,13 @@ class LIR_OpTypeCheck: public LIR_Op {
15441544
LIR_Opr _tmp1;
15451545
LIR_Opr _tmp2;
15461546
LIR_Opr _tmp3;
1547-
bool _fast_check;
15481547
CodeEmitInfo* _info_for_patch;
15491548
CodeEmitInfo* _info_for_exception;
15501549
CodeStub* _stub;
15511550
ciMethod* _profiled_method;
15521551
int _profiled_bci;
15531552
bool _should_profile;
1553+
bool _fast_check;
15541554

15551555
public:
15561556
LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object, ciKlass* klass,
@@ -1593,13 +1593,13 @@ class LIR_Op2: public LIR_Op {
15931593
protected:
15941594
LIR_Opr _opr1;
15951595
LIR_Opr _opr2;
1596-
BasicType _type;
15971596
LIR_Opr _tmp1;
15981597
LIR_Opr _tmp2;
15991598
LIR_Opr _tmp3;
16001599
LIR_Opr _tmp4;
16011600
LIR_Opr _tmp5;
16021601
LIR_Condition _condition;
1602+
BasicType _type;
16031603

16041604
void verify() const;
16051605

@@ -1609,13 +1609,13 @@ class LIR_Op2: public LIR_Op {
16091609
, _fpu_stack_size(0)
16101610
, _opr1(opr1)
16111611
, _opr2(opr2)
1612-
, _type(type)
16131612
, _tmp1(LIR_OprFact::illegalOpr)
16141613
, _tmp2(LIR_OprFact::illegalOpr)
16151614
, _tmp3(LIR_OprFact::illegalOpr)
16161615
, _tmp4(LIR_OprFact::illegalOpr)
16171616
, _tmp5(LIR_OprFact::illegalOpr)
1618-
, _condition(condition) {
1617+
, _condition(condition)
1618+
, _type(type) {
16191619
assert(code == lir_cmp || code == lir_branch || code == lir_cond_float_branch || code == lir_assert, "code check");
16201620
}
16211621

@@ -1624,13 +1624,13 @@ class LIR_Op2: public LIR_Op {
16241624
, _fpu_stack_size(0)
16251625
, _opr1(opr1)
16261626
, _opr2(opr2)
1627-
, _type(type)
16281627
, _tmp1(LIR_OprFact::illegalOpr)
16291628
, _tmp2(LIR_OprFact::illegalOpr)
16301629
, _tmp3(LIR_OprFact::illegalOpr)
16311630
, _tmp4(LIR_OprFact::illegalOpr)
16321631
, _tmp5(LIR_OprFact::illegalOpr)
1633-
, _condition(condition) {
1632+
, _condition(condition)
1633+
, _type(type) {
16341634
assert(code == lir_cmove, "code check");
16351635
assert(type != T_ILLEGAL, "cmove should have type");
16361636
}
@@ -1641,13 +1641,13 @@ class LIR_Op2: public LIR_Op {
16411641
, _fpu_stack_size(0)
16421642
, _opr1(opr1)
16431643
, _opr2(opr2)
1644-
, _type(type)
16451644
, _tmp1(LIR_OprFact::illegalOpr)
16461645
, _tmp2(LIR_OprFact::illegalOpr)
16471646
, _tmp3(LIR_OprFact::illegalOpr)
16481647
, _tmp4(LIR_OprFact::illegalOpr)
16491648
, _tmp5(LIR_OprFact::illegalOpr)
1650-
, _condition(lir_cond_unknown) {
1649+
, _condition(lir_cond_unknown)
1650+
, _type(type) {
16511651
assert(code != lir_cmp && code != lir_branch && code != lir_cond_float_branch && is_in_range(code, begin_op2, end_op2), "code check");
16521652
}
16531653

@@ -1657,13 +1657,13 @@ class LIR_Op2: public LIR_Op {
16571657
, _fpu_stack_size(0)
16581658
, _opr1(opr1)
16591659
, _opr2(opr2)
1660-
, _type(T_ILLEGAL)
16611660
, _tmp1(tmp1)
16621661
, _tmp2(tmp2)
16631662
, _tmp3(tmp3)
16641663
, _tmp4(tmp4)
16651664
, _tmp5(tmp5)
1666-
, _condition(lir_cond_unknown) {
1665+
, _condition(lir_cond_unknown)
1666+
, _type(T_ILLEGAL) {
16671667
assert(code != lir_cmp && code != lir_branch && code != lir_cond_float_branch && is_in_range(code, begin_op2, end_op2), "code check");
16681668
}
16691669

@@ -1748,8 +1748,8 @@ class LIR_OpAllocArray : public LIR_Op {
17481748
LIR_Opr _tmp2;
17491749
LIR_Opr _tmp3;
17501750
LIR_Opr _tmp4;
1751-
BasicType _type;
17521751
CodeStub* _stub;
1752+
BasicType _type;
17531753
bool _zero_array;
17541754

17551755
public:
@@ -1761,8 +1761,8 @@ class LIR_OpAllocArray : public LIR_Op {
17611761
, _tmp2(t2)
17621762
, _tmp3(t3)
17631763
, _tmp4(t4)
1764-
, _type(type)
17651764
, _stub(stub)
1765+
, _type(type)
17661766
, _zero_array(zero_array) {}
17671767

17681768
LIR_Opr klass() const { return _klass; }
@@ -1811,13 +1811,13 @@ class LIR_Op4: public LIR_Op {
18111811
LIR_Opr _opr2;
18121812
LIR_Opr _opr3;
18131813
LIR_Opr _opr4;
1814-
BasicType _type;
18151814
LIR_Opr _tmp1;
18161815
LIR_Opr _tmp2;
18171816
LIR_Opr _tmp3;
18181817
LIR_Opr _tmp4;
18191818
LIR_Opr _tmp5;
18201819
LIR_Condition _condition;
1820+
BasicType _type;
18211821

18221822
public:
18231823
LIR_Op4(LIR_Code code, LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr opr3, LIR_Opr opr4,
@@ -1827,13 +1827,13 @@ class LIR_Op4: public LIR_Op {
18271827
, _opr2(opr2)
18281828
, _opr3(opr3)
18291829
, _opr4(opr4)
1830-
, _type(type)
18311830
, _tmp1(LIR_OprFact::illegalOpr)
18321831
, _tmp2(LIR_OprFact::illegalOpr)
18331832
, _tmp3(LIR_OprFact::illegalOpr)
18341833
, _tmp4(LIR_OprFact::illegalOpr)
18351834
, _tmp5(LIR_OprFact::illegalOpr)
1836-
, _condition(condition) {
1835+
, _condition(condition)
1836+
, _type(type) {
18371837
assert(code == lir_cmove, "code check");
18381838
assert(type != T_ILLEGAL, "cmove should have type");
18391839
}

0 commit comments

Comments
 (0)