< prev index next >

src/share/vm/opto/connode.hpp

Print this page




  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_CONNODE_HPP
  26 #define SHARE_VM_OPTO_CONNODE_HPP
  27 
  28 #include "opto/node.hpp"
  29 #include "opto/opcodes.hpp"
  30 #include "opto/type.hpp"
  31 
  32 class PhaseTransform;
  33 class MachNode;
  34 
  35 //------------------------------ConNode----------------------------------------
  36 // Simple constants
  37 class ConNode : public TypeNode {
  38 public:
  39   ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) {
  40     init_req(0, (Node*)Compile::current()->root());
  41     init_flags(Flag_is_Con);
  42   }
  43   virtual int  Opcode() const;
  44   virtual uint hash() const;
  45   virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
  46   virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; }
  47 
  48   // Polymorphic factory method:
  49   static ConNode* make(const Type *t);
  50 };
  51 
  52 //------------------------------ConINode---------------------------------------
  53 // Simple integer constants
  54 class ConINode : public ConNode {
  55 public:
  56   ConINode( const TypeInt *t ) : ConNode(t) {}
  57   virtual int Opcode() const;
  58 
  59   // Factory method:
  60   static ConINode* make(int con) {
  61     return new ConINode( TypeInt::make(con) );
  62   }
  63 
  64 };
  65 
  66 //------------------------------ConPNode---------------------------------------
  67 // Simple pointer constants
  68 class ConPNode : public ConNode {
  69 public:
  70   ConPNode( const TypePtr *t ) : ConNode(t) {}
  71   virtual int Opcode() const;
  72 
  73   // Factory methods:
  74   static ConPNode* make(address con) {
  75     if (con == NULL)
  76       return new ConPNode( TypePtr::NULL_PTR ) ;
  77     else
  78       return new ConPNode( TypeRawPtr::make(con) );
  79   }
  80 };
  81 
  82 
  83 //------------------------------ConNNode--------------------------------------
  84 // Simple narrow oop constants
  85 class ConNNode : public ConNode {
  86 public:
  87   ConNNode( const TypeNarrowOop *t ) : ConNode(t) {}
  88   virtual int Opcode() const;
  89 };
  90 
  91 //------------------------------ConNKlassNode---------------------------------
  92 // Simple narrow klass constants
  93 class ConNKlassNode : public ConNode {
  94 public:
  95   ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {}
  96   virtual int Opcode() const;
  97 };
  98 
  99 
 100 //------------------------------ConLNode---------------------------------------
 101 // Simple long constants
 102 class ConLNode : public ConNode {
 103 public:
 104   ConLNode( const TypeLong *t ) : ConNode(t) {}
 105   virtual int Opcode() const;
 106 
 107   // Factory method:
 108   static ConLNode* make(jlong con) {
 109     return new ConLNode( TypeLong::make(con) );
 110   }
 111 
 112 };
 113 
 114 //------------------------------ConFNode---------------------------------------
 115 // Simple float constants
 116 class ConFNode : public ConNode {
 117 public:
 118   ConFNode( const TypeF *t ) : ConNode(t) {}
 119   virtual int Opcode() const;
 120 
 121   // Factory method:
 122   static ConFNode* make(float con) {
 123     return new ConFNode( TypeF::make(con) );
 124   }
 125 
 126 };
 127 
 128 //------------------------------ConDNode---------------------------------------
 129 // Simple double constants
 130 class ConDNode : public ConNode {
 131 public:
 132   ConDNode( const TypeD *t ) : ConNode(t) {}
 133   virtual int Opcode() const;
 134 
 135   // Factory method:
 136   static ConDNode* make(double con) {
 137     return new ConDNode( TypeD::make(con) );
 138   }
 139 
 140 };
 141 
 142 //------------------------------ThreadLocalNode--------------------------------
 143 // Ideal Node which returns the base of ThreadLocalStorage.
 144 class ThreadLocalNode : public Node {
 145 public:
 146     ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {}
 147     virtual int Opcode() const;
 148     virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;}
 149     virtual uint ideal_reg() const { return Op_RegP; }
 150 };
 151 
 152 
 153 
 154 #endif // SHARE_VM_OPTO_CONNODE_HPP


  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_CONNODE_HPP
  26 #define SHARE_VM_OPTO_CONNODE_HPP
  27 
  28 #include "opto/node.hpp"
  29 #include "opto/opcodes.hpp"
  30 #include "opto/type.hpp"
  31 
  32 class PhaseTransform;
  33 class MachNode;
  34 
  35 //------------------------------ConNode----------------------------------------
  36 // Simple constants
  37 class ConNode : public TypeNode {
  38 public:
  39   ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) {
  40     init_req(0, (Node*)Compile::current()->root());
  41     init_flags(Flag_is_Con);
  42   }
  43   virtual uint Opcode() const;
  44   virtual uint hash() const;
  45   virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
  46   virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; }
  47 
  48   // Polymorphic factory method:
  49   static ConNode* make(const Type *t);
  50 };
  51 
  52 //------------------------------ConINode---------------------------------------
  53 // Simple integer constants
  54 class ConINode : public ConNode {
  55 public:
  56   ConINode( const TypeInt *t ) : ConNode(t) {}
  57   virtual uint Opcode() const;
  58 
  59   // Factory method:
  60   static ConINode* make(int con) {
  61     return new ConINode( TypeInt::make(con) );
  62   }
  63 
  64 };
  65 
  66 //------------------------------ConPNode---------------------------------------
  67 // Simple pointer constants
  68 class ConPNode : public ConNode {
  69 public:
  70   ConPNode( const TypePtr *t ) : ConNode(t) {}
  71   virtual uint Opcode() const;
  72 
  73   // Factory methods:
  74   static ConPNode* make(address con) {
  75     if (con == NULL)
  76       return new ConPNode( TypePtr::NULL_PTR ) ;
  77     else
  78       return new ConPNode( TypeRawPtr::make(con) );
  79   }
  80 };
  81 
  82 
  83 //------------------------------ConNNode--------------------------------------
  84 // Simple narrow oop constants
  85 class ConNNode : public ConNode {
  86 public:
  87   ConNNode( const TypeNarrowOop *t ) : ConNode(t) {}
  88   virtual uint Opcode() const;
  89 };
  90 
  91 //------------------------------ConNKlassNode---------------------------------
  92 // Simple narrow klass constants
  93 class ConNKlassNode : public ConNode {
  94 public:
  95   ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {}
  96   virtual uint Opcode() const;
  97 };
  98 
  99 
 100 //------------------------------ConLNode---------------------------------------
 101 // Simple long constants
 102 class ConLNode : public ConNode {
 103 public:
 104   ConLNode( const TypeLong *t ) : ConNode(t) {}
 105   virtual uint Opcode() const;
 106 
 107   // Factory method:
 108   static ConLNode* make(jlong con) {
 109     return new ConLNode( TypeLong::make(con) );
 110   }
 111 
 112 };
 113 
 114 //------------------------------ConFNode---------------------------------------
 115 // Simple float constants
 116 class ConFNode : public ConNode {
 117 public:
 118   ConFNode( const TypeF *t ) : ConNode(t) {}
 119   virtual uint Opcode() const;
 120 
 121   // Factory method:
 122   static ConFNode* make(float con) {
 123     return new ConFNode( TypeF::make(con) );
 124   }
 125 
 126 };
 127 
 128 //------------------------------ConDNode---------------------------------------
 129 // Simple double constants
 130 class ConDNode : public ConNode {
 131 public:
 132   ConDNode( const TypeD *t ) : ConNode(t) {}
 133   virtual uint Opcode() const;
 134 
 135   // Factory method:
 136   static ConDNode* make(double con) {
 137     return new ConDNode( TypeD::make(con) );
 138   }
 139 
 140 };
 141 
 142 //------------------------------ThreadLocalNode--------------------------------
 143 // Ideal Node which returns the base of ThreadLocalStorage.
 144 class ThreadLocalNode : public Node {
 145 public:
 146     ThreadLocalNode( ) : Node((Node*)Compile::current()->root()) {}
 147     virtual uint Opcode() const;
 148     virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM;}
 149     virtual uint ideal_reg() const { return Op_RegP; }
 150 };
 151 
 152 
 153 
 154 #endif // SHARE_VM_OPTO_CONNODE_HPP
< prev index next >