< prev index next >

src/share/vm/opto/memnode.hpp

Print this page

        

*** 205,215 **** virtual uint hash() const; // Check the type // Handle algebraic identities here. If we have an identity, return the Node // we are equivalent to. We look for Load of a Store. ! virtual Node *Identity( PhaseTransform *phase ); // If the load is from Field memory and the pointer is non-null, it might be possible to // zero out the control input. // If the offset is constant and the base is an object allocation, // try to hook me up to the exact initializing store. --- 205,215 ---- virtual uint hash() const; // Check the type // Handle algebraic identities here. If we have an identity, return the Node // we are equivalent to. We look for Load of a Store. ! virtual Node* Identity(PhaseGVN* phase); // If the load is from Field memory and the pointer is non-null, it might be possible to // zero out the control input. // If the offset is constant and the base is an object allocation, // try to hook me up to the exact initializing store.
*** 221,235 **** // Recover original value from boxed values Node *eliminate_autobox(PhaseGVN *phase); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type *Value( PhaseTransform *phase ) const; // Common methods for LoadKlass and LoadNKlass nodes. ! const Type *klass_value_common( PhaseTransform *phase ) const; ! Node *klass_identity_common( PhaseTransform *phase ); virtual uint ideal_reg() const; virtual const Type *bottom_type() const; // Following method is copied from TypeNode: void set_type(const Type* t) { --- 221,235 ---- // Recover original value from boxed values Node *eliminate_autobox(PhaseGVN *phase); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type* Value(PhaseGVN* phase) const; // Common methods for LoadKlass and LoadNKlass nodes. ! const Type* klass_value_common(PhaseGVN* phase) const; ! Node* klass_identity_common(PhaseGVN* phase); virtual uint ideal_reg() const; virtual const Type *bottom_type() const; // Following method is copied from TypeNode: void set_type(const Type* t) {
*** 282,292 **** LoadBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value(PhaseTransform *phase) const; virtual int store_Opcode() const { return Op_StoreB; } virtual BasicType memory_type() const { return T_BYTE; } }; //------------------------------LoadUBNode------------------------------------- --- 282,292 ---- LoadBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual int store_Opcode() const { return Op_StoreB; } virtual BasicType memory_type() const { return T_BYTE; } }; //------------------------------LoadUBNode-------------------------------------
*** 296,306 **** LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node* Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value(PhaseTransform *phase) const; virtual int store_Opcode() const { return Op_StoreB; } virtual BasicType memory_type() const { return T_BYTE; } }; //------------------------------LoadUSNode------------------------------------- --- 296,306 ---- LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node* Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual int store_Opcode() const { return Op_StoreB; } virtual BasicType memory_type() const { return T_BYTE; } }; //------------------------------LoadUSNode-------------------------------------
*** 310,320 **** LoadUSNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value(PhaseTransform *phase) const; virtual int store_Opcode() const { return Op_StoreC; } virtual BasicType memory_type() const { return T_CHAR; } }; //------------------------------LoadSNode-------------------------------------- --- 310,320 ---- LoadUSNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual int store_Opcode() const { return Op_StoreC; } virtual BasicType memory_type() const { return T_CHAR; } }; //------------------------------LoadSNode--------------------------------------
*** 324,334 **** LoadSNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value(PhaseTransform *phase) const; virtual int store_Opcode() const { return Op_StoreC; } virtual BasicType memory_type() const { return T_SHORT; } }; //------------------------------LoadINode-------------------------------------- --- 324,334 ---- LoadSNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest) : LoadNode(c, mem, adr, at, ti, mo, control_dependency) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual int store_Opcode() const { return Op_StoreC; } virtual BasicType memory_type() const { return T_SHORT; } }; //------------------------------LoadINode--------------------------------------
*** 348,359 **** class LoadRangeNode : public LoadINode { public: LoadRangeNode(Node *c, Node *mem, Node *adr, const TypeInt *ti = TypeInt::POS) : LoadINode(c, mem, adr, TypeAryPtr::RANGE, ti, MemNode::unordered) {} virtual int Opcode() const; ! virtual const Type *Value( PhaseTransform *phase ) const; ! virtual Node *Identity( PhaseTransform *phase ); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); }; //------------------------------LoadLNode-------------------------------------- // Load a long from memory --- 348,359 ---- class LoadRangeNode : public LoadINode { public: LoadRangeNode(Node *c, Node *mem, Node *adr, const TypeInt *ti = TypeInt::POS) : LoadINode(c, mem, adr, TypeAryPtr::RANGE, ti, MemNode::unordered) {} virtual int Opcode() const; ! virtual const Type* Value(PhaseGVN* phase) const; ! virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); }; //------------------------------LoadLNode-------------------------------------- // Load a long from memory
*** 481,492 **** virtual bool can_remove_control() const; public: LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo) : LoadPNode(c, mem, adr, at, tk, mo) {} virtual int Opcode() const; ! virtual const Type *Value( PhaseTransform *phase ) const; ! virtual Node *Identity( PhaseTransform *phase ); virtual bool depends_only_on_test() const { return true; } // Polymorphic factory method: static Node* make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* at, const TypeKlassPtr* tk = TypeKlassPtr::OBJECT); --- 481,492 ---- virtual bool can_remove_control() const; public: LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo) : LoadPNode(c, mem, adr, at, tk, mo) {} virtual int Opcode() const; ! virtual const Type* Value(PhaseGVN* phase) const; ! virtual Node* Identity(PhaseGVN* phase); virtual bool depends_only_on_test() const { return true; } // Polymorphic factory method: static Node* make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* at, const TypeKlassPtr* tk = TypeKlassPtr::OBJECT);
*** 501,512 **** virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegN; } virtual int store_Opcode() const { return Op_StoreNKlass; } virtual BasicType memory_type() const { return T_NARROWKLASS; } ! virtual const Type *Value( PhaseTransform *phase ) const; ! virtual Node *Identity( PhaseTransform *phase ); virtual bool depends_only_on_test() const { return true; } }; //------------------------------StoreNode-------------------------------------- --- 501,512 ---- virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegN; } virtual int store_Opcode() const { return Op_StoreNKlass; } virtual BasicType memory_type() const { return T_NARROWKLASS; } ! virtual const Type* Value(PhaseGVN* phase) const; ! virtual Node* Identity(PhaseGVN* phase); virtual bool depends_only_on_test() const { return true; } }; //------------------------------StoreNode--------------------------------------
*** 579,592 **** // zero out the control input. virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type *Value( PhaseTransform *phase ) const; // Check for identity function on memory (Load then Store at same address) ! virtual Node *Identity( PhaseTransform *phase ); // Do not match memory edge virtual uint match_edge(uint idx) const; virtual const Type *bottom_type() const; // returns Type::MEMORY --- 579,592 ---- // zero out the control input. virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); // Compute a new Type for this node. Basically we just do the pre-check, // then call the virtual add() to set the type. ! virtual const Type* Value(PhaseGVN* phase) const; // Check for identity function on memory (Load then Store at same address) ! virtual Node* Identity(PhaseGVN* phase); // Do not match memory edge virtual uint match_edge(uint idx) const; virtual const Type *bottom_type() const; // returns Type::MEMORY
*** 744,756 **** assert(_oop_alias_idx >= Compile::AliasIdxRaw || _oop_alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0, "bad oop alias idx"); } virtual int Opcode() const; ! virtual Node *Identity( PhaseTransform *phase ); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type *Value( PhaseTransform *phase ) const; virtual BasicType memory_type() const { return T_VOID; } // unspecific int oop_alias_idx() const { return _oop_alias_idx; } }; //------------------------------LoadPLockedNode--------------------------------- --- 744,756 ---- assert(_oop_alias_idx >= Compile::AliasIdxRaw || _oop_alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0, "bad oop alias idx"); } virtual int Opcode() const; ! virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); ! virtual const Type* Value(PhaseGVN* phase) const; virtual BasicType memory_type() const { return T_VOID; } // unspecific int oop_alias_idx() const { return _oop_alias_idx; } }; //------------------------------LoadPLockedNode---------------------------------
*** 780,790 **** Node* ctrl = in(0); if (ctrl == NULL) return NULL; // node is dead return ctrl->in(MemNode::Memory)->adr_type(); } virtual uint ideal_reg() const { return 0;} // memory projections don't have a register ! virtual const Type *Value( PhaseTransform *phase ) const; #ifndef PRODUCT virtual void dump_spec(outputStream *st) const {}; #endif }; --- 780,790 ---- Node* ctrl = in(0); if (ctrl == NULL) return NULL; // node is dead return ctrl->in(MemNode::Memory)->adr_type(); } virtual uint ideal_reg() const { return 0;} // memory projections don't have a register ! virtual const Type* Value(PhaseGVN* phase) const; #ifndef PRODUCT virtual void dump_spec(outputStream *st) const {}; #endif };
*** 932,942 **** virtual int Opcode() const; virtual const Type *bottom_type() const { return Type::MEMORY; } // ClearArray modifies array elements, and so affects only the // array memory addressed by the bottom_type of its base address. virtual const class TypePtr *adr_type() const; ! virtual Node *Identity( PhaseTransform *phase ); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint match_edge(uint idx) const; // Clear the given area of an object or array. // The start offset must always be aligned mod BytesPerInt. --- 932,942 ---- virtual int Opcode() const; virtual const Type *bottom_type() const { return Type::MEMORY; } // ClearArray modifies array elements, and so affects only the // array memory addressed by the bottom_type of its base address. 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; // Clear the given area of an object or array. // The start offset must always be aligned mod BytesPerInt.
*** 981,991 **** Precedent = TypeFunc::Parms // optional edge to force precedence }; MemBarNode(Compile* C, int alias_idx, Node* precedent); virtual int Opcode() const = 0; virtual const class TypePtr *adr_type() const { return _adr_type; } ! virtual const Type *Value( PhaseTransform *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. --- 981,991 ---- Precedent = TypeFunc::Parms // optional edge to force precedence }; MemBarNode(Compile* C, int alias_idx, Node* precedent); virtual int Opcode() const = 0; 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.
*** 1197,1207 **** // Otherwise, make a new memory state with just that base memory input. // In either case, the result is a newly created MergeMem. static MergeMemNode* make(Node* base_memory); virtual int Opcode() const; ! virtual Node *Identity( PhaseTransform *phase ); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint ideal_reg() const { return NotAMachineReg; } virtual uint match_edge(uint idx) const { return 0; } virtual const RegMask &out_RegMask() const; virtual const Type *bottom_type() const { return Type::MEMORY; } --- 1197,1207 ---- // Otherwise, make a new memory state with just that base memory input. // In either case, the result is a newly created MergeMem. static MergeMemNode* make(Node* base_memory); virtual int Opcode() const; ! virtual Node* Identity(PhaseGVN* phase); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual uint ideal_reg() const { return NotAMachineReg; } virtual uint match_edge(uint idx) const { return 0; } virtual const RegMask &out_RegMask() const; virtual const Type *bottom_type() const { return Type::MEMORY; }
< prev index next >