src/share/vm/opto/castnode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/castnode.hpp

src/share/vm/opto/castnode.hpp

Print this page
rev 7063 : 8054478: C2: Incorrectly compiled char[] array access crashes JVM
Summary: propagate node replacements along control flow edges to callers
Reviewed-by: dead backbranch in main loop results in erroneous array access

*** 46,59 **** }; //------------------------------CastIINode------------------------------------- // cast integer to integer (different range) class CastIINode: public ConstraintCastNode { public: ! CastIINode (Node *n, const Type *t ): ConstraintCastNode(n,t) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } }; //------------------------------CastPPNode------------------------------------- // cast pointer to pointer (different type) class CastPPNode: public ConstraintCastNode { --- 46,72 ---- }; //------------------------------CastIINode------------------------------------- // cast integer to integer (different range) class CastIINode: public ConstraintCastNode { + private: + // Can this node be removed post CCP or does it carry a required dependency? + const bool _required; + // Is the type of this CastII the best we can do or do we expect to + // improve it later on and so we shouldn't optimize it out? + const bool _inexact; public: ! CastIINode(Node *n, const Type *t, bool required = false, bool inexact = false) ! : ConstraintCastNode(n,t), _required(required), _inexact(inexact) {} virtual int Opcode() const; virtual uint ideal_reg() const { return Op_RegI; } + virtual Node *Identity( PhaseTransform *phase ); + virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); + virtual Node *Ideal_DU_postCCP( PhaseCCP * ); + #ifndef PRODUCT + virtual void dump_spec(outputStream *st) const; + #endif }; //------------------------------CastPPNode------------------------------------- // cast pointer to pointer (different type) class CastPPNode: public ConstraintCastNode {
src/share/vm/opto/castnode.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File