Mercurial > hg > truffle
comparison src/share/vm/opto/memnode.hpp @ 20804:7848fc12602b
Merge with jdk8u40-b25
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Tue, 07 Apr 2015 14:58:49 +0200 |
parents | 52b4284cb496 e7b3d177adda |
children |
comparison
equal
deleted
inserted
replaced
20184:84105dcdb05b | 20804:7848fc12602b |
---|---|
146 const MemOrd _mo; | 146 const MemOrd _mo; |
147 | 147 |
148 protected: | 148 protected: |
149 virtual uint cmp(const Node &n) const; | 149 virtual uint cmp(const Node &n) const; |
150 virtual uint size_of() const; // Size is bigger | 150 virtual uint size_of() const; // Size is bigger |
151 // Should LoadNode::Ideal() attempt to remove control edges? | |
152 virtual bool can_remove_control() const; | |
151 const Type* const _type; // What kind of value is loaded? | 153 const Type* const _type; // What kind of value is loaded? |
152 public: | 154 public: |
153 | 155 |
154 LoadNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, MemOrd mo) | 156 LoadNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, MemOrd mo) |
155 : MemNode(c,mem,adr,at), _type(rt), _mo(mo) { | 157 : MemNode(c,mem,adr,at), _type(rt), _mo(mo) { |
169 | 171 |
170 // Handle algebraic identities here. If we have an identity, return the Node | 172 // Handle algebraic identities here. If we have an identity, return the Node |
171 // we are equivalent to. We look for Load of a Store. | 173 // we are equivalent to. We look for Load of a Store. |
172 virtual Node *Identity( PhaseTransform *phase ); | 174 virtual Node *Identity( PhaseTransform *phase ); |
173 | 175 |
174 // If the load is from Field memory and the pointer is non-null, we can | 176 // If the load is from Field memory and the pointer is non-null, it might be possible to |
175 // zero out the control input. | 177 // zero out the control input. |
178 // If the offset is constant and the base is an object allocation, | |
179 // try to hook me up to the exact initializing store. | |
176 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 180 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
177 | 181 |
178 // Split instance field load through Phi. | 182 // Split instance field load through Phi. |
179 Node* split_through_phi(PhaseGVN *phase); | 183 Node* split_through_phi(PhaseGVN *phase); |
180 | 184 |
411 }; | 415 }; |
412 | 416 |
413 //------------------------------LoadKlassNode---------------------------------- | 417 //------------------------------LoadKlassNode---------------------------------- |
414 // Load a Klass from an object | 418 // Load a Klass from an object |
415 class LoadKlassNode : public LoadPNode { | 419 class LoadKlassNode : public LoadPNode { |
420 protected: | |
421 // In most cases, LoadKlassNode does not have the control input set. If the control | |
422 // input is set, it must not be removed (by LoadNode::Ideal()). | |
423 virtual bool can_remove_control() const; | |
416 public: | 424 public: |
417 LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo) | 425 LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo) |
418 : LoadPNode(c, mem, adr, at, tk, mo) {} | 426 : LoadPNode(c, mem, adr, at, tk, mo) {} |
419 virtual int Opcode() const; | 427 virtual int Opcode() const; |
420 virtual const Type *Value( PhaseTransform *phase ) const; | 428 virtual const Type *Value( PhaseTransform *phase ) const; |
421 virtual Node *Identity( PhaseTransform *phase ); | 429 virtual Node *Identity( PhaseTransform *phase ); |
422 virtual bool depends_only_on_test() const { return true; } | 430 virtual bool depends_only_on_test() const { return true; } |
423 | 431 |
424 // Polymorphic factory method: | 432 // Polymorphic factory method: |
425 static Node* make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* at, | 433 static Node* make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* at, |
426 const TypeKlassPtr *tk = TypeKlassPtr::OBJECT ); | 434 const TypeKlassPtr* tk = TypeKlassPtr::OBJECT); |
427 }; | 435 }; |
428 | 436 |
429 //------------------------------LoadNKlassNode--------------------------------- | 437 //------------------------------LoadNKlassNode--------------------------------- |
430 // Load a narrow Klass from an object. | 438 // Load a narrow Klass from an object. |
431 class LoadNKlassNode : public LoadNNode { | 439 class LoadNKlassNode : public LoadNNode { |