< prev index next >

src/share/vm/opto/arraycopynode.hpp

Print this page
rev 12726 : 8179678: ArrayCopy with same src and dst can cause incorrect execution or compiler crash
Summary: replacing load on dst with load on src only valid if copy doesn't modify src element to load
Reviewed-by:


 150   bool is_copyofrange_validated() const  { assert(_kind != None, "should bet set"); return _kind == CopyOfRange && _arguments_validated; }
 151 
 152   void set_arraycopy(bool validated)   { assert(_kind == None, "shouldn't bet set yet"); _kind = ArrayCopy; _arguments_validated = validated; }
 153   void set_clonebasic()                { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneBasic; }
 154   void set_cloneoop()                  { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneOop; }
 155   void set_copyof(bool validated)      { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOf; _arguments_validated = validated; }
 156   void set_copyofrange(bool validated) { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOfRange; _arguments_validated = validated; }
 157 
 158   virtual int Opcode() const;
 159   virtual uint size_of() const; // Size is bigger
 160   virtual bool guaranteed_safepoint()  { return false; }
 161   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 162 
 163   virtual bool may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
 164 
 165   bool is_alloc_tightly_coupled() const { return _alloc_tightly_coupled; }
 166 
 167   bool has_negative_length_guard() const { return _has_negative_length_guard; }
 168 
 169   static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac);
 170   bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify);

 171 
 172 #ifndef PRODUCT
 173   virtual void dump_spec(outputStream *st) const;
 174   virtual void dump_compact_spec(outputStream* st) const;
 175 #endif
 176 };
 177 #endif // SHARE_VM_OPTO_ARRAYCOPYNODE_HPP


 150   bool is_copyofrange_validated() const  { assert(_kind != None, "should bet set"); return _kind == CopyOfRange && _arguments_validated; }
 151 
 152   void set_arraycopy(bool validated)   { assert(_kind == None, "shouldn't bet set yet"); _kind = ArrayCopy; _arguments_validated = validated; }
 153   void set_clonebasic()                { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneBasic; }
 154   void set_cloneoop()                  { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneOop; }
 155   void set_copyof(bool validated)      { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOf; _arguments_validated = validated; }
 156   void set_copyofrange(bool validated) { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOfRange; _arguments_validated = validated; }
 157 
 158   virtual int Opcode() const;
 159   virtual uint size_of() const; // Size is bigger
 160   virtual bool guaranteed_safepoint()  { return false; }
 161   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 162 
 163   virtual bool may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);
 164 
 165   bool is_alloc_tightly_coupled() const { return _alloc_tightly_coupled; }
 166 
 167   bool has_negative_length_guard() const { return _has_negative_length_guard; }
 168 
 169   static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac);
 170   bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const;
 171   bool can_replace_dest_load_with_src_load(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase) const;
 172 
 173 #ifndef PRODUCT
 174   virtual void dump_spec(outputStream *st) const;
 175   virtual void dump_compact_spec(outputStream* st) const;
 176 #endif
 177 };
 178 #endif // SHARE_VM_OPTO_ARRAYCOPYNODE_HPP
< prev index next >