< prev index next >

src/hotspot/share/opto/memnode.hpp

Print this page




 486   virtual int store_Opcode() const { return Op_StoreP; }
 487   virtual BasicType memory_type() const { return T_ADDRESS; }
 488 };
 489 
 490 
 491 //------------------------------LoadNNode--------------------------------------
 492 // Load a narrow oop from memory (either object or array)
 493 class LoadNNode : public LoadNode {
 494 public:
 495   LoadNNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const Type* t, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest)
 496     : LoadNode(c, mem, adr, at, t, mo, control_dependency) {}
 497   virtual int Opcode() const;
 498   virtual uint ideal_reg() const { return Op_RegN; }
 499   virtual int store_Opcode() const { return Op_StoreN; }
 500   virtual BasicType memory_type() const { return T_NARROWOOP; }
 501 };
 502 
 503 //------------------------------LoadKlassNode----------------------------------
 504 // Load a Klass from an object
 505 class LoadKlassNode : public LoadPNode {


 506 protected:
 507   // In most cases, LoadKlassNode does not have the control input set. If the control
 508   // input is set, it must not be removed (by LoadNode::Ideal()).
 509   virtual bool can_remove_control() const;
 510 public:
 511   LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo)
 512     : LoadPNode(c, mem, adr, at, tk, mo) {}

 513   virtual int Opcode() const;
 514   virtual const Type* Value(PhaseGVN* phase) const;
 515   virtual Node* Identity(PhaseGVN* phase);
 516   virtual bool depends_only_on_test() const { return true; }

 517 
 518   // Polymorphic factory method:
 519   static Node* make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* at,
 520                     const TypeKlassPtr* tk = TypeKlassPtr::OBJECT);
 521 };
 522 
 523 //------------------------------LoadNKlassNode---------------------------------
 524 // Load a narrow Klass from an object.
 525 class LoadNKlassNode : public LoadNNode {


 526 public:
 527   LoadNKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeNarrowKlass *tk, MemOrd mo)
 528     : LoadNNode(c, mem, adr, at, tk, mo) {}

 529   virtual int Opcode() const;
 530   virtual uint ideal_reg() const { return Op_RegN; }
 531   virtual int store_Opcode() const { return Op_StoreNKlass; }
 532   virtual BasicType memory_type() const { return T_NARROWKLASS; }
 533 
 534   virtual const Type* Value(PhaseGVN* phase) const;
 535   virtual Node* Identity(PhaseGVN* phase);
 536   virtual bool depends_only_on_test() const { return true; }

 537 };
 538 
 539 // Retrieve the null free/flattened property from an array klass. This
 540 // is treated a bit like a field that would be read from the klass
 541 // structure at runtime except, the implementation encodes the
 542 // property as a bit in the klass header field of the array. This
 543 // implementation detail is hidden under this node so it doesn't make
 544 // a difference for high level optimizations. At final graph reshaping
 545 // time, this node is turned into the actual logical operations that
 546 // extract the property from the klass pointer. For this to work
 547 // correctly, GeStoragePropertyNodes must take a LoadKlass/LoadNKlass
 548 // input. The Ideal transformation splits the GetStoragePropertyNode
 549 // through phis, Value returns a constant if the node's input is a
 550 // constant. These 2 should guarantee GetStoragePropertyNode does
 551 // indeed have a LoadKlass/LoadNKlass input at final graph reshaping
 552 // time.
 553 class GetStoragePropertyNode : public Node {
 554 protected:
 555   GetStoragePropertyNode(Node* klass) : Node(NULL, klass) {}
 556 public:




 486   virtual int store_Opcode() const { return Op_StoreP; }
 487   virtual BasicType memory_type() const { return T_ADDRESS; }
 488 };
 489 
 490 
 491 //------------------------------LoadNNode--------------------------------------
 492 // Load a narrow oop from memory (either object or array)
 493 class LoadNNode : public LoadNode {
 494 public:
 495   LoadNNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const Type* t, MemOrd mo, ControlDependency control_dependency = DependsOnlyOnTest)
 496     : LoadNode(c, mem, adr, at, t, mo, control_dependency) {}
 497   virtual int Opcode() const;
 498   virtual uint ideal_reg() const { return Op_RegN; }
 499   virtual int store_Opcode() const { return Op_StoreN; }
 500   virtual BasicType memory_type() const { return T_NARROWOOP; }
 501 };
 502 
 503 //------------------------------LoadKlassNode----------------------------------
 504 // Load a Klass from an object
 505 class LoadKlassNode : public LoadPNode {
 506 private:
 507   bool _clear_prop_bits; // Clear the ArrayStorageProperties bits
 508 protected:
 509   // In most cases, LoadKlassNode does not have the control input set. If the control
 510   // input is set, it must not be removed (by LoadNode::Ideal()).
 511   virtual bool can_remove_control() const;
 512 public:
 513   LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo, bool clear_prop_bits)
 514     : LoadPNode(c, mem, adr, at, tk, mo), _clear_prop_bits(clear_prop_bits) {}
 515   virtual uint size_of() const { return sizeof(*this); }
 516   virtual int Opcode() const;
 517   virtual const Type* Value(PhaseGVN* phase) const;
 518   virtual Node* Identity(PhaseGVN* phase);
 519   virtual bool depends_only_on_test() const { return true; }
 520   bool clear_prop_bits() const { return _clear_prop_bits; }
 521 
 522   // Polymorphic factory method:
 523   static Node* make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const TypePtr* at,
 524                     const TypeKlassPtr* tk = TypeKlassPtr::OBJECT, bool clear_prop_bits = false);
 525 };
 526 
 527 //------------------------------LoadNKlassNode---------------------------------
 528 // Load a narrow Klass from an object.
 529 class LoadNKlassNode : public LoadNNode {
 530 private:
 531   bool _clear_prop_bits; // Clear the ArrayStorageProperties bits
 532 public:
 533   LoadNKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeNarrowKlass *tk, MemOrd mo, bool clear_prop_bits)
 534     : LoadNNode(c, mem, adr, at, tk, mo), _clear_prop_bits(clear_prop_bits) {}
 535   virtual uint size_of() const { return sizeof(*this); }
 536   virtual int Opcode() const;
 537   virtual uint ideal_reg() const { return Op_RegN; }
 538   virtual int store_Opcode() const { return Op_StoreNKlass; }
 539   virtual BasicType memory_type() const { return T_NARROWKLASS; }
 540 
 541   virtual const Type* Value(PhaseGVN* phase) const;
 542   virtual Node* Identity(PhaseGVN* phase);
 543   virtual bool depends_only_on_test() const { return true; }
 544   bool clear_prop_bits() const { return _clear_prop_bits; }
 545 };
 546 
 547 // Retrieve the null free/flattened property from an array klass. This
 548 // is treated a bit like a field that would be read from the klass
 549 // structure at runtime except, the implementation encodes the
 550 // property as a bit in the klass header field of the array. This
 551 // implementation detail is hidden under this node so it doesn't make
 552 // a difference for high level optimizations. At final graph reshaping
 553 // time, this node is turned into the actual logical operations that
 554 // extract the property from the klass pointer. For this to work
 555 // correctly, GeStoragePropertyNodes must take a LoadKlass/LoadNKlass
 556 // input. The Ideal transformation splits the GetStoragePropertyNode
 557 // through phis, Value returns a constant if the node's input is a
 558 // constant. These 2 should guarantee GetStoragePropertyNode does
 559 // indeed have a LoadKlass/LoadNKlass input at final graph reshaping
 560 // time.
 561 class GetStoragePropertyNode : public Node {
 562 protected:
 563   GetStoragePropertyNode(Node* klass) : Node(NULL, klass) {}
 564 public:


< prev index next >