Mercurial > hg > graal-compiler
comparison src/share/vm/opto/connode.hpp @ 126:72f4a668df19
6625997: CastPP, CheckCastPP and Proj nodes are not dead loop safe
Summary: EA and initialization optimizations could bypass these nodes.
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Wed, 23 Apr 2008 19:09:16 -0700 |
parents | b130b98db9cf |
children | 885ed790ecf0 |
comparison
equal
deleted
inserted
replaced
125:d942c7e64bd9 | 126:72f4a668df19 |
---|---|
237 | 237 |
238 //------------------------------CastPPNode------------------------------------- | 238 //------------------------------CastPPNode------------------------------------- |
239 // cast pointer to pointer (different type) | 239 // cast pointer to pointer (different type) |
240 class CastPPNode: public ConstraintCastNode { | 240 class CastPPNode: public ConstraintCastNode { |
241 public: | 241 public: |
242 CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) { | 242 CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {} |
243 // Only CastPP is safe. CastII can cause optimizer loops. | |
244 init_flags(Flag_is_dead_loop_safe); | |
245 } | |
246 virtual int Opcode() const; | 243 virtual int Opcode() const; |
247 virtual uint ideal_reg() const { return Op_RegP; } | 244 virtual uint ideal_reg() const { return Op_RegP; } |
248 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); | 245 virtual Node *Ideal_DU_postCCP( PhaseCCP * ); |
249 }; | 246 }; |
250 | 247 |
252 // for _checkcast, cast pointer to pointer (different type), without JOIN, | 249 // for _checkcast, cast pointer to pointer (different type), without JOIN, |
253 class CheckCastPPNode: public TypeNode { | 250 class CheckCastPPNode: public TypeNode { |
254 public: | 251 public: |
255 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) { | 252 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) { |
256 init_class_id(Class_CheckCastPP); | 253 init_class_id(Class_CheckCastPP); |
257 init_flags(Flag_is_dead_loop_safe); | |
258 init_req(0, c); | 254 init_req(0, c); |
259 init_req(1, n); | 255 init_req(1, n); |
260 } | 256 } |
257 | |
261 virtual Node *Identity( PhaseTransform *phase ); | 258 virtual Node *Identity( PhaseTransform *phase ); |
262 virtual const Type *Value( PhaseTransform *phase ) const; | 259 virtual const Type *Value( PhaseTransform *phase ) const; |
263 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 260 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
264 virtual int Opcode() const; | 261 virtual int Opcode() const; |
265 virtual uint ideal_reg() const { return Op_RegP; } | 262 virtual uint ideal_reg() const { return Op_RegP; } |