< prev index next >

src/share/vm/opto/valuetypenode.hpp

Print this page

        

*** 46,55 **** --- 46,58 ---- virtual const TypeValueTypePtr* value_type_ptr() const = 0; // Get the klass defining the field layout of the value type virtual ciValueKlass* value_klass() const = 0; int make_scalar_in_safepoint(SafePointNode* sfpt, Node* root, PhaseGVN* gvn); + + static void make(PhaseGVN* gvn, Node* n, ValueTypeBaseNode* vt, ciValueKlass* base_vk, int base_offset, int base_input, bool in); + public: // Support for control flow merges bool has_phi_inputs(Node* region); ValueTypeBaseNode* clone_with_phis(PhaseGVN* gvn, Node* region); ValueTypeBaseNode* merge_with(PhaseGVN* gvn, const ValueTypeBaseNode* other, int pnum, bool transform);
*** 66,75 **** --- 69,92 ---- int field_offset(uint index) const; ciType* field_type(uint index) const; // Replace ValueTypeNodes in debug info at safepoints with SafePointScalarObjectNodes void make_scalar_in_safepoints(Node* root, PhaseGVN* gvn); + + void store_flattened(PhaseGVN* gvn, Node* ctl, MergeMemNode* mem, Node* base, ciValueKlass* holder, int holder_offset) const; + void store(PhaseGVN* gvn, Node* ctl, MergeMemNode* mem, Node* base, ciValueKlass* holder = NULL, int holder_offset = 0) const; + + // Initialize the value type by loading its field values from memory + void load(PhaseGVN& gvn, Node* mem, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0); + + void replace_call_results(Node* call, Compile* C); + + static Node* allocate(const Type* type, + Node*& ctl, Node*& mem, Node*& io, + Node* frameptr, + Node*& ex_ctl, Node*& ex_mem, Node*& ex_io, + JVMState* jvms, PhaseIterGVN *igvn); }; //------------------------------ValueTypeNode------------------------------------- // Node representing a value type in C2 IR class ValueTypeNode : public ValueTypeBaseNode {
*** 85,96 **** : ValueTypeBaseNode(t, Values + field_count) { init_class_id(Class_ValueType); init_req(Oop, oop); } - // Initialize the value type by loading its field values from memory - void load(PhaseGVN& gvn, Node* mem, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0); // Checks if the value type is loaded from memory and if so returns the oop Node* is_loaded(PhaseGVN* phase, const TypeValueType* t, Node* base = NULL, int holder_offset = 0); const TypeValueTypePtr* value_type_ptr() const { return TypeValueTypePtr::make(bottom_type()->isa_valuetype()); } // Get the klass defining the field layout of the value type --- 102,111 ----
*** 103,113 **** static Node* make_default(PhaseGVN& gvn, ciValueKlass* vk); // Create a new ValueTypeNode and load its values from an oop static Node* make(PhaseGVN& gvn, Node* mem, Node* oop); // Create a new ValueTypeNode and load its values from a flattened value type field or array static Node* make(PhaseGVN& gvn, ciValueKlass* vk, Node* mem, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0); ! // Store the value type as a flattened (headerless) representation void store_flattened(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0) const; // Store the field values to memory void store(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0) const; --- 118,129 ---- static Node* make_default(PhaseGVN& gvn, ciValueKlass* vk); // Create a new ValueTypeNode and load its values from an oop static Node* make(PhaseGVN& gvn, Node* mem, Node* oop); // Create a new ValueTypeNode and load its values from a flattened value type field or array static Node* make(PhaseGVN& gvn, ciValueKlass* vk, Node* mem, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0); ! // Create value type node from arguments at method entry and calls ! static Node* make(PhaseGVN& gvn, Node* n, ciValueKlass* vk, int base_input, bool in); // Store the value type as a flattened (headerless) representation void store_flattened(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0) const; // Store the field values to memory void store(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0) const;
*** 116,126 **** Node* allocate(GraphKit* kit); bool is_allocated(PhaseGVN* phase) const; void pass_klass(Node* n, uint pos, const GraphKit& kit); uint pass_fields(Node* call, int base_input, const GraphKit& kit, ciValueKlass* base_vk = NULL, int base_offset = 0); - void replace_call_results(Node* call, Compile* C); // Allocation optimizations void remove_redundant_allocations(PhaseIterGVN* igvn, PhaseIdealLoop* phase); virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); --- 132,141 ----
*** 135,144 **** --- 150,165 ---- // Node representing a value type as a pointer in C2 IR class ValueTypePtrNode : public ValueTypeBaseNode { private: ciValueKlass* value_klass() const { return type()->is_valuetypeptr()->value_type()->value_klass(); } const TypeValueTypePtr* value_type_ptr() const { return bottom_type()->isa_valuetypeptr(); } + + ValueTypePtrNode(ciValueKlass* vk, Compile* C) + : ValueTypeBaseNode(TypeValueTypePtr::make(TypePtr::NotNull, vk), Values + vk->nof_declared_nonstatic_fields()) { + init_class_id(Class_ValueTypePtr); + C->add_value_type_ptr(this); + } public: ValueTypePtrNode(ValueTypeNode* vt, Node* oop, Compile* C) : ValueTypeBaseNode(TypeValueTypePtr::make(vt->type()->is_valuetype())->cast_to_ptr_type(TypePtr::NotNull), vt->req()) { init_class_id(Class_ValueTypePtr);
*** 147,155 **** --- 168,178 ---- } init_req(Oop, oop); C->add_value_type_ptr(this); } + static ValueTypePtrNode* make(PhaseGVN* gvn, CheckCastPPNode* cast); + static ValueTypePtrNode* make(PhaseGVN& gvn, Node* mem, Node* oop); virtual int Opcode() const; }; #endif // SHARE_VM_OPTO_VALUETYPENODE_HPP
< prev index next >