< prev index next >

src/share/vm/opto/valuetypenode.hpp

Print this page

        

*** 47,57 **** } // Get the klass defining the field layout of the value type ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); } // Initialize the value type by loading its field values from memory ! void load_values(PhaseGVN& gvn, Node* mem, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0); enum { Control, // Control input Oop, // Oop of TypeValueTypePtr Values // Nodes corresponding to values of the value type's fields. // Nodes are connected in increasing order of the index of the field --- 47,59 ---- } // Get the klass defining the field layout of the value type ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); } // 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); enum { Control, // Control input Oop, // Oop of TypeValueTypePtr Values // Nodes corresponding to values of the value type's fields. // Nodes are connected in increasing order of the index of the field
*** 71,90 **** // Support for control flow merges ValueTypeNode* clone_with_phis(PhaseGVN* gvn, Node* region); bool has_phi_inputs(Node* region); ValueTypeNode* merge_with(PhaseGVN* gvn, const ValueTypeNode* other, int pnum, bool transform); ! // Store the value type to memory if not yet allocated and returns the oop ! Node* store_to_memory(GraphKit* kit); ! // Store the value type to a flattened value type field or array ! void store(GraphKit* kit, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0) const; // Store the field values to memory ! void store_values(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder, int holder_offset = 0) const; // Get oop for heap allocated value type (may be TypePtr::NULL_PTR) Node* get_oop() const { return in(Oop); } void set_oop(Node* oop) { set_req(Oop, oop); } // Value type fields uint field_count() const { return req() - Values; } Node* field_value(uint index) const; Node* field_value_by_offset(int offset, bool recursive = false) const; --- 73,93 ---- // Support for control flow merges ValueTypeNode* clone_with_phis(PhaseGVN* gvn, Node* region); bool has_phi_inputs(Node* region); ValueTypeNode* merge_with(PhaseGVN* gvn, const ValueTypeNode* other, int pnum, bool transform); ! // 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; // Get oop for heap allocated value type (may be TypePtr::NULL_PTR) Node* get_oop() const { return in(Oop); } void set_oop(Node* oop) { set_req(Oop, oop); } + // Allocates the value type (if not yet allocated) and returns the oop + Node* allocate(GraphKit* kit); + bool is_allocated(PhaseGVN* phase) const; // Value type fields uint field_count() const { return req() - Values; } Node* field_value(uint index) const; Node* field_value_by_offset(int offset, bool recursive = false) const;
*** 96,105 **** --- 99,110 ---- void make_scalar_in_safepoints(Compile* C); 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); virtual int Opcode() const; #ifndef PRODUCT
< prev index next >