< prev index next >

src/hotspot/share/opto/memnode.hpp

Print this page

        

*** 109,118 **** --- 109,122 ---- #else return 0; #endif } + #ifdef ASSERT + void set_adr_type(const TypePtr* adr_type) { _adr_type = adr_type; } + #endif + // Map a load or store opcode to its corresponding store opcode. // (Return -1 if unknown.) virtual int store_Opcode() const { return -1; } // What is the type of the value in memory? (T_VOID mean "unspecified".)
*** 527,536 **** --- 531,567 ---- virtual const Type* Value(PhaseGVN* phase) const; virtual Node* Identity(PhaseGVN* phase); virtual bool depends_only_on_test() const { return true; } }; + // Retrieve the null free property from an array klass. This is + // treated a bit like a field that would be read from the klass + // structure at runtime except, the implementation encodes the + // property as a bit in the klass header field of the array. This + // implementation detail is hidden under this node so it doesn't make + // a difference for high level optimizations. At final graph reshaping + // time, this node is turned into the actual logical operations that + // extract the property from the klass pointer. For this to work + // correctly, GetNullFreePropertyNode must take a LoadKlass/LoadNKlass + // input. The Ideal transformation splits the GetNullFreePropertyNode + // through phis, Value returns a constant if the node's input is a + // constant. These 2 should guarantee GetNullFreePropertyNode does + // indeed have a LoadKlass/LoadNKlass input at final graph reshaping + // time. + class GetNullFreePropertyNode : public Node { + public: + GetNullFreePropertyNode(Node* klass) : Node(NULL, klass) {} + virtual int Opcode() const; + virtual const Type* Value(PhaseGVN* phase) const; + virtual Node* Ideal(PhaseGVN *phase, bool can_reshape); + virtual const Type* bottom_type() const { + if (in(1)->bottom_type()->isa_klassptr()) { + return TypeLong::LONG; + } + return TypeInt::INT; + } + }; //------------------------------StoreNode-------------------------------------- // Store value; requires Store, Address and Value class StoreNode : public MemNode { private:
*** 1103,1115 **** //------------------------------ClearArray------------------------------------- class ClearArrayNode: public Node { private: bool _is_large; public: ! ClearArrayNode( Node *ctrl, Node *arymem, Node *word_cnt, Node *base, bool is_large) ! : Node(ctrl,arymem,word_cnt,base), _is_large(is_large) { init_class_id(Class_ClearArray); } virtual int Opcode() const; virtual const Type *bottom_type() const { return Type::MEMORY; } // ClearArray modifies array elements, and so affects only the --- 1134,1148 ---- //------------------------------ClearArray------------------------------------- class ClearArrayNode: public Node { private: bool _is_large; + bool _word_copy_only; public: ! ClearArrayNode( Node *ctrl, Node *arymem, Node *word_cnt, Node *base, Node* val, bool is_large) ! : Node(ctrl, arymem, word_cnt, base, val), _is_large(is_large), ! _word_copy_only(val->bottom_type()->isa_long() && (!val->bottom_type()->is_long()->is_con() || val->bottom_type()->is_long()->get_con() != 0)) { init_class_id(Class_ClearArray); } virtual int Opcode() const; virtual const Type *bottom_type() const { return Type::MEMORY; } // ClearArray modifies array elements, and so affects only the
*** 1117,1140 **** --- 1150,1179 ---- virtual const class TypePtr *adr_type() const; virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const; bool is_large() const { return _is_large; } + bool word_copy_only() const { return _word_copy_only; } // Clear the given area of an object or array. // The start offset must always be aligned mod BytesPerInt. // The end offset must always be aligned mod BytesPerLong. // Return the new memory. static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* val, + Node* raw_val, intptr_t start_offset, intptr_t end_offset, PhaseGVN* phase); static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* val, + Node* raw_val, intptr_t start_offset, Node* end_offset, PhaseGVN* phase); static Node* clear_memory(Node* control, Node* mem, Node* dest, + Node* raw_val, Node* start_offset, Node* end_offset, PhaseGVN* phase); // Return allocation input memory edge if it is different instance // or itself if it is the one we are looking for.
*** 1181,1191 **** virtual const class TypePtr *adr_type() const { return _adr_type; } virtual const Type* Value(PhaseGVN* phase) const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const { return 0; } virtual const Type *bottom_type() const { return TypeTuple::MEMBAR; } ! virtual Node *match( const ProjNode *proj, const Matcher *m ); // Factory method. Builds a wide or narrow membar. // Optional 'precedent' becomes an extra edge if not null. static MemBarNode* make(Compile* C, int opcode, int alias_idx = Compile::AliasIdxBot, Node* precedent = NULL); --- 1220,1230 ---- virtual const class TypePtr *adr_type() const { return _adr_type; } virtual const Type* Value(PhaseGVN* phase) const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const { return 0; } virtual const Type *bottom_type() const { return TypeTuple::MEMBAR; } ! virtual Node *match(const ProjNode *proj, const Matcher *m, const RegMask* mask); // Factory method. Builds a wide or narrow membar. // Optional 'precedent' becomes an extra edge if not null. static MemBarNode* make(Compile* C, int opcode, int alias_idx = Compile::AliasIdxBot, Node* precedent = NULL);
< prev index next >