src/share/vm/opto/memnode.hpp

changeset 548
ba764ed4b6f2
parent 509
2a9af0b9cb1c
child 554
d1a5218d7eaf
     1.1 --- a/src/share/vm/opto/memnode.hpp	Fri Apr 11 09:56:35 2008 -0400
     1.2 +++ b/src/share/vm/opto/memnode.hpp	Sun Apr 13 17:43:42 2008 -0400
     1.3 @@ -137,7 +137,8 @@
     1.4    }
     1.5  
     1.6    // Polymorphic factory method:
     1.7 -  static LoadNode* make( Compile *C, Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, BasicType bt );
     1.8 +  static Node* make( PhaseGVN& gvn, Node *c, Node *mem, Node *adr,
     1.9 +                     const TypePtr* at, const Type *rt, BasicType bt );
    1.10  
    1.11    virtual uint hash()   const;  // Check the type
    1.12  
    1.13 @@ -330,6 +331,29 @@
    1.14    virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; }
    1.15  };
    1.16  
    1.17 +
    1.18 +//------------------------------LoadNNode--------------------------------------
    1.19 +// Load a narrow oop from memory (either object or array)
    1.20 +class LoadNNode : public LoadNode {
    1.21 +public:
    1.22 +  LoadNNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const Type* t )
    1.23 +    : LoadNode(c,mem,adr,at,t) {}
    1.24 +  virtual int Opcode() const;
    1.25 +  virtual uint ideal_reg() const { return Op_RegN; }
    1.26 +  virtual int store_Opcode() const { return Op_StoreN; }
    1.27 +  virtual BasicType memory_type() const { return T_NARROWOOP; }
    1.28 +  // depends_only_on_test is almost always true, and needs to be almost always
    1.29 +  // true to enable key hoisting & commoning optimizations.  However, for the
    1.30 +  // special case of RawPtr loads from TLS top & end, the control edge carries
    1.31 +  // the dependence preventing hoisting past a Safepoint instead of the memory
    1.32 +  // edge.  (An unfortunate consequence of having Safepoints not set Raw
    1.33 +  // Memory; itself an unfortunate consequence of having Nodes which produce
    1.34 +  // results (new raw memory state) inside of loops preventing all manner of
    1.35 +  // other optimizations).  Basically, it's ugly but so is the alternative.
    1.36 +  // See comment in macro.cpp, around line 125 expand_allocate_common().
    1.37 +  virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; }
    1.38 +};
    1.39 +
    1.40  //------------------------------LoadKlassNode----------------------------------
    1.41  // Load a Klass from an object
    1.42  class LoadKlassNode : public LoadPNode {
    1.43 @@ -376,7 +400,8 @@
    1.44    }
    1.45  
    1.46    // Polymorphic factory method:
    1.47 -  static StoreNode* make( Compile *C, Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, BasicType bt );
    1.48 +  static StoreNode* make( PhaseGVN& gvn, Node *c, Node *mem, Node *adr,
    1.49 +                          const TypePtr* at, Node *val, BasicType bt );
    1.50  
    1.51    virtual uint hash() const;    // Check the type
    1.52  
    1.53 @@ -488,6 +513,15 @@
    1.54    virtual BasicType memory_type() const { return T_ADDRESS; }
    1.55  };
    1.56  
    1.57 +//------------------------------StoreNNode-------------------------------------
    1.58 +// Store narrow oop to memory
    1.59 +class StoreNNode : public StoreNode {
    1.60 +public:
    1.61 +  StoreNNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val ) : StoreNode(c,mem,adr,at,val) {}
    1.62 +  virtual int Opcode() const;
    1.63 +  virtual BasicType memory_type() const { return T_NARROWOOP; }
    1.64 +};
    1.65 +
    1.66  //------------------------------StoreCMNode-----------------------------------
    1.67  // Store card-mark byte to memory for CM
    1.68  // The last StoreCM before a SafePoint must be preserved and occur after its "oop" store
    1.69 @@ -600,6 +634,13 @@
    1.70    virtual int Opcode() const;
    1.71  };
    1.72  
    1.73 +//------------------------------CompareAndSwapNNode---------------------------
    1.74 +class CompareAndSwapNNode : public LoadStoreNode {
    1.75 +public:
    1.76 +  CompareAndSwapNNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreNode(c, mem, adr, val, ex) { }
    1.77 +  virtual int Opcode() const;
    1.78 +};
    1.79 +
    1.80  //------------------------------ClearArray-------------------------------------
    1.81  class ClearArrayNode: public Node {
    1.82  public:

mercurial