8334232: Optimize C1 classes layout
Reviewed-by: phh, kvn
This commit is contained in:
parent
021c2c36ac
commit
24f67d0254
@ -281,11 +281,11 @@ class Instruction: public CompilationResourceObj {
|
||||
#endif
|
||||
int _use_count; // the number of instructions referring to this value (w/o prev/next); only roots can have use count = 0 or > 1
|
||||
int _pin_state; // set of PinReason describing the reason for pinning
|
||||
unsigned int _flags; // Flag bits
|
||||
ValueType* _type; // the instruction value type
|
||||
Instruction* _next; // the next instruction if any (null for BlockEnd instructions)
|
||||
Instruction* _subst; // the substitution instruction if any
|
||||
LIR_Opr _operand; // LIR specific information
|
||||
unsigned int _flags; // Flag bits
|
||||
|
||||
ValueStack* _state_before; // Copy of state with input operands still on stack (or null)
|
||||
ValueStack* _exception_state; // Copy of state for exception handling
|
||||
@ -403,11 +403,11 @@ class Instruction: public CompilationResourceObj {
|
||||
#endif
|
||||
_use_count(0)
|
||||
, _pin_state(0)
|
||||
, _flags(0)
|
||||
, _type(type)
|
||||
, _next(nullptr)
|
||||
, _subst(nullptr)
|
||||
, _operand(LIR_OprFact::illegalOpr)
|
||||
, _flags(0)
|
||||
, _state_before(state_before)
|
||||
, _exception_handlers(nullptr)
|
||||
, _block(nullptr)
|
||||
@ -1518,9 +1518,9 @@ LEAF(MonitorExit, AccessMonitor)
|
||||
LEAF(Intrinsic, StateSplit)
|
||||
private:
|
||||
vmIntrinsics::ID _id;
|
||||
ArgsNonNullState _nonnull_state;
|
||||
Values* _args;
|
||||
Value _recv;
|
||||
ArgsNonNullState _nonnull_state;
|
||||
|
||||
public:
|
||||
// preserves_state can be set to true for Intrinsics
|
||||
|
@ -296,13 +296,13 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object,
|
||||
, _tmp1(tmp1)
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _fast_check(fast_check)
|
||||
, _info_for_patch(info_for_patch)
|
||||
, _info_for_exception(info_for_exception)
|
||||
, _stub(stub)
|
||||
, _profiled_method(nullptr)
|
||||
, _profiled_bci(-1)
|
||||
, _should_profile(false)
|
||||
, _fast_check(fast_check)
|
||||
{
|
||||
if (code == lir_checkcast) {
|
||||
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
|
||||
, _tmp1(tmp1)
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _fast_check(false)
|
||||
, _info_for_patch(nullptr)
|
||||
, _info_for_exception(info_for_exception)
|
||||
, _stub(nullptr)
|
||||
, _profiled_method(nullptr)
|
||||
, _profiled_bci(-1)
|
||||
, _should_profile(false)
|
||||
, _fast_check(false)
|
||||
{
|
||||
if (code == lir_store_check) {
|
||||
_stub = new ArrayStoreExceptionStub(object, info_for_exception);
|
||||
|
@ -528,44 +528,44 @@ class LIR_Address: public LIR_OprPtr {
|
||||
private:
|
||||
LIR_Opr _base;
|
||||
LIR_Opr _index;
|
||||
Scale _scale;
|
||||
intx _disp;
|
||||
Scale _scale;
|
||||
BasicType _type;
|
||||
|
||||
public:
|
||||
LIR_Address(LIR_Opr base, LIR_Opr index, BasicType type):
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(times_1)
|
||||
, _disp(0)
|
||||
, _scale(times_1)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(LIR_Opr::illegalOpr())
|
||||
, _scale(times_1)
|
||||
, _disp(disp)
|
||||
, _scale(times_1)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, BasicType type):
|
||||
_base(base)
|
||||
, _index(LIR_Opr::illegalOpr())
|
||||
, _scale(times_1)
|
||||
, _disp(0)
|
||||
, _scale(times_1)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, LIR_Opr index, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(times_1)
|
||||
, _disp(disp)
|
||||
, _scale(times_1)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(scale)
|
||||
, _disp(disp)
|
||||
, _scale(scale)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Opr base() const { return _base; }
|
||||
@ -1544,13 +1544,13 @@ class LIR_OpTypeCheck: public LIR_Op {
|
||||
LIR_Opr _tmp1;
|
||||
LIR_Opr _tmp2;
|
||||
LIR_Opr _tmp3;
|
||||
bool _fast_check;
|
||||
CodeEmitInfo* _info_for_patch;
|
||||
CodeEmitInfo* _info_for_exception;
|
||||
CodeStub* _stub;
|
||||
ciMethod* _profiled_method;
|
||||
int _profiled_bci;
|
||||
bool _should_profile;
|
||||
bool _fast_check;
|
||||
|
||||
public:
|
||||
LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object, ciKlass* klass,
|
||||
@ -1593,13 +1593,13 @@ class LIR_Op2: public LIR_Op {
|
||||
protected:
|
||||
LIR_Opr _opr1;
|
||||
LIR_Opr _opr2;
|
||||
BasicType _type;
|
||||
LIR_Opr _tmp1;
|
||||
LIR_Opr _tmp2;
|
||||
LIR_Opr _tmp3;
|
||||
LIR_Opr _tmp4;
|
||||
LIR_Opr _tmp5;
|
||||
LIR_Condition _condition;
|
||||
BasicType _type;
|
||||
|
||||
void verify() const;
|
||||
|
||||
@ -1609,13 +1609,13 @@ class LIR_Op2: public LIR_Op {
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(type)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(condition) {
|
||||
, _condition(condition)
|
||||
, _type(type) {
|
||||
assert(code == lir_cmp || code == lir_branch || code == lir_cond_float_branch || code == lir_assert, "code check");
|
||||
}
|
||||
|
||||
@ -1624,13 +1624,13 @@ class LIR_Op2: public LIR_Op {
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(type)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(condition) {
|
||||
, _condition(condition)
|
||||
, _type(type) {
|
||||
assert(code == lir_cmove, "code check");
|
||||
assert(type != T_ILLEGAL, "cmove should have type");
|
||||
}
|
||||
@ -1641,13 +1641,13 @@ class LIR_Op2: public LIR_Op {
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(type)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(lir_cond_unknown) {
|
||||
, _condition(lir_cond_unknown)
|
||||
, _type(type) {
|
||||
assert(code != lir_cmp && code != lir_branch && code != lir_cond_float_branch && is_in_range(code, begin_op2, end_op2), "code check");
|
||||
}
|
||||
|
||||
@ -1657,13 +1657,13 @@ class LIR_Op2: public LIR_Op {
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(T_ILLEGAL)
|
||||
, _tmp1(tmp1)
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _tmp4(tmp4)
|
||||
, _tmp5(tmp5)
|
||||
, _condition(lir_cond_unknown) {
|
||||
, _condition(lir_cond_unknown)
|
||||
, _type(T_ILLEGAL) {
|
||||
assert(code != lir_cmp && code != lir_branch && code != lir_cond_float_branch && is_in_range(code, begin_op2, end_op2), "code check");
|
||||
}
|
||||
|
||||
@ -1748,8 +1748,8 @@ class LIR_OpAllocArray : public LIR_Op {
|
||||
LIR_Opr _tmp2;
|
||||
LIR_Opr _tmp3;
|
||||
LIR_Opr _tmp4;
|
||||
BasicType _type;
|
||||
CodeStub* _stub;
|
||||
BasicType _type;
|
||||
bool _zero_array;
|
||||
|
||||
public:
|
||||
@ -1761,8 +1761,8 @@ class LIR_OpAllocArray : public LIR_Op {
|
||||
, _tmp2(t2)
|
||||
, _tmp3(t3)
|
||||
, _tmp4(t4)
|
||||
, _type(type)
|
||||
, _stub(stub)
|
||||
, _type(type)
|
||||
, _zero_array(zero_array) {}
|
||||
|
||||
LIR_Opr klass() const { return _klass; }
|
||||
@ -1811,13 +1811,13 @@ class LIR_Op4: public LIR_Op {
|
||||
LIR_Opr _opr2;
|
||||
LIR_Opr _opr3;
|
||||
LIR_Opr _opr4;
|
||||
BasicType _type;
|
||||
LIR_Opr _tmp1;
|
||||
LIR_Opr _tmp2;
|
||||
LIR_Opr _tmp3;
|
||||
LIR_Opr _tmp4;
|
||||
LIR_Opr _tmp5;
|
||||
LIR_Condition _condition;
|
||||
BasicType _type;
|
||||
|
||||
public:
|
||||
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 {
|
||||
, _opr2(opr2)
|
||||
, _opr3(opr3)
|
||||
, _opr4(opr4)
|
||||
, _type(type)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(condition) {
|
||||
, _condition(condition)
|
||||
, _type(type) {
|
||||
assert(code == lir_cmove, "code check");
|
||||
assert(type != T_ILLEGAL, "cmove should have type");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user