8334230: Optimize C2 classes layout

Reviewed-by: shade, kvn, thartmann
This commit is contained in:
Neethu Prasad 2024-07-30 14:08:17 +00:00
parent 4148613148
commit 1cb27f7e23
4 changed files with 9 additions and 9 deletions
src/hotspot/share

@ -102,10 +102,10 @@ public:
class C2Access: public StackObj {
protected:
DecoratorSet _decorators;
BasicType _type;
Node* _base;
C2AccessValuePtr& _addr;
Node* _raw_access;
BasicType _type;
uint8_t _barrier_data;
void fixup_decorators();
@ -114,10 +114,10 @@ public:
C2Access(DecoratorSet decorators,
BasicType type, Node* base, C2AccessValuePtr& addr) :
_decorators(decorators),
_type(type),
_base(base),
_addr(addr),
_raw_access(nullptr),
_type(type),
_barrier_data(0)
{}

@ -42,9 +42,9 @@ private:
// Used 32-bit words
uint _size;
uint32_t* _data;
// Allocated words
uint _data_size;
uint32_t* _data;
Arena* _set_arena;
ReallocMark _nesting; // Safety checks for arena reallocation

@ -754,18 +754,18 @@ protected:
virtual bool cmp( const Node &n ) const;
virtual uint size_of() const; // Size is bigger
ciMethod* _method; // Method being direct called
bool _optimized_virtual;
bool _method_handle_invoke;
bool _override_symbolic_info; // Override symbolic call site info from bytecode
ciMethod* _method; // Method being direct called
bool _arg_escape; // ArgEscape in parameter list
public:
CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method)
: CallNode(tf, addr, TypePtr::BOTTOM),
_method(method),
_optimized_virtual(false),
_method_handle_invoke(false),
_override_symbolic_info(false),
_method(method),
_arg_escape(false)
{
init_class_id(Class_CallJava);

@ -2723,13 +2723,13 @@ uint StoreNode::hash() const {
//
class ArrayPointer {
private:
const bool _is_valid; // The parsing succeeded
const Node* _pointer; // The final pointer to the position in the array
const Node* _base; // Base address of the array
const jlong _constant_offset; // Sum of collected constant offsets
const Node* _int_offset; // (optional) Offset behind LShiftL and ConvI2L
const jint _int_offset_shift; // (optional) Shift value for int_offset
const GrowableArray<Node*>* _other_offsets; // List of other AddP offsets
const jint _int_offset_shift; // (optional) Shift value for int_offset
const bool _is_valid; // The parsing succeeded
ArrayPointer(const bool is_valid,
const Node* pointer,
@ -2738,13 +2738,13 @@ private:
const Node* int_offset,
const jint int_offset_shift,
const GrowableArray<Node*>* other_offsets) :
_is_valid(is_valid),
_pointer(pointer),
_base(base),
_constant_offset(constant_offset),
_int_offset(int_offset),
_other_offsets(other_offsets),
_int_offset_shift(int_offset_shift),
_other_offsets(other_offsets)
_is_valid(is_valid)
{
assert(_pointer != nullptr, "must always have pointer");
assert(is_valid == (_base != nullptr), "have base exactly if valid");