< prev index next >

src/share/vm/opto/vectornode.hpp

Print this page




  45   }
  46 
  47   VectorNode(Node* n1, Node* n2, Node* n3, const TypeVect* vt) : TypeNode(vt, 4) {
  48     init_class_id(Class_Vector);
  49     init_req(1, n1);
  50     init_req(2, n2);
  51     init_req(3, n3);
  52   }
  53 
  54   const TypeVect* vect_type() const { return type()->is_vect(); }
  55   uint length() const { return vect_type()->length(); } // Vector length
  56   uint length_in_bytes() const { return vect_type()->length_in_bytes(); }
  57 
  58   virtual int Opcode() const;
  59 
  60   virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
  61 
  62   static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
  63   static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
  64   static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);

  65 
  66   static int  opcode(int opc, BasicType bt);
  67   static bool implemented(int opc, uint vlen, BasicType bt);
  68   static bool is_shift(Node* n);
  69   static bool is_invariant_vector(Node* n);
  70   // [Start, end) half-open range defining which operands are vectors
  71   static void vector_operands(Node* n, uint* start, uint* end);
  72 };
  73 
  74 //===========================Vector=ALU=Operations=============================
  75 
  76 //------------------------------AddVBNode--------------------------------------
  77 // Vector add byte
  78 class AddVBNode : public VectorNode {
  79  public:
  80   AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  81   virtual int Opcode() const;
  82 };
  83 
  84 //------------------------------AddVSNode--------------------------------------


 240 // Vector multiply long
 241 class MulVLNode : public VectorNode {
 242 public:
 243   MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 244   virtual int Opcode() const;
 245 };
 246 
 247 //------------------------------MulVFNode--------------------------------------
 248 // Vector multiply float
 249 class MulVFNode : public VectorNode {
 250 public:
 251   MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 252   virtual int Opcode() const;
 253 };
 254 
 255 //------------------------------MulVDNode--------------------------------------
 256 // Vector multiply double
 257 class MulVDNode : public VectorNode {
 258 public:
 259   MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
















 260   virtual int Opcode() const;
 261 };
 262 
 263 //------------------------------CMoveVDNode--------------------------------------
 264 // Vector multiply double
 265 class CMoveVDNode : public VectorNode {
 266 public:
 267   CMoveVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
 268   virtual int Opcode() const;
 269 };
 270 
 271 //------------------------------MulReductionVINode--------------------------------------
 272 // Vector multiply int as a reduction
 273 class MulReductionVINode : public ReductionNode {
 274 public:
 275   MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 276   virtual int Opcode() const;
 277   virtual const Type* bottom_type() const { return TypeInt::INT; }
 278   virtual uint ideal_reg() const { return Op_RegI; }
 279 };




  45   }
  46 
  47   VectorNode(Node* n1, Node* n2, Node* n3, const TypeVect* vt) : TypeNode(vt, 4) {
  48     init_class_id(Class_Vector);
  49     init_req(1, n1);
  50     init_req(2, n2);
  51     init_req(3, n3);
  52   }
  53 
  54   const TypeVect* vect_type() const { return type()->is_vect(); }
  55   uint length() const { return vect_type()->length(); } // Vector length
  56   uint length_in_bytes() const { return vect_type()->length_in_bytes(); }
  57 
  58   virtual int Opcode() const;
  59 
  60   virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
  61 
  62   static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
  63   static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
  64   static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
  65   static VectorNode* make(int opc, Node* n1, Node* n2, Node* n3, uint vlen, BasicType bt);
  66 
  67   static int  opcode(int opc, BasicType bt);
  68   static bool implemented(int opc, uint vlen, BasicType bt);
  69   static bool is_shift(Node* n);
  70   static bool is_invariant_vector(Node* n);
  71   // [Start, end) half-open range defining which operands are vectors
  72   static void vector_operands(Node* n, uint* start, uint* end);
  73 };
  74 
  75 //===========================Vector=ALU=Operations=============================
  76 
  77 //------------------------------AddVBNode--------------------------------------
  78 // Vector add byte
  79 class AddVBNode : public VectorNode {
  80  public:
  81   AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  82   virtual int Opcode() const;
  83 };
  84 
  85 //------------------------------AddVSNode--------------------------------------


 241 // Vector multiply long
 242 class MulVLNode : public VectorNode {
 243 public:
 244   MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 245   virtual int Opcode() const;
 246 };
 247 
 248 //------------------------------MulVFNode--------------------------------------
 249 // Vector multiply float
 250 class MulVFNode : public VectorNode {
 251 public:
 252   MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 253   virtual int Opcode() const;
 254 };
 255 
 256 //------------------------------MulVDNode--------------------------------------
 257 // Vector multiply double
 258 class MulVDNode : public VectorNode {
 259 public:
 260   MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 261   virtual int Opcode() const;
 262 };
 263 
 264 //------------------------------FmaVDNode--------------------------------------
 265 // Vector multiply double
 266 class FmaVDNode : public VectorNode {
 267 public:
 268   FmaVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
 269   virtual int Opcode() const;
 270 };
 271 
 272 //------------------------------FmaVFNode--------------------------------------
 273 // Vector multiply float
 274 class FmaVFNode : public VectorNode {
 275 public:
 276   FmaVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
 277   virtual int Opcode() const;
 278 };
 279 
 280 //------------------------------CMoveVDNode--------------------------------------
 281 // Vector multiply double
 282 class CMoveVDNode : public VectorNode {
 283 public:
 284   CMoveVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
 285   virtual int Opcode() const;
 286 };
 287 
 288 //------------------------------MulReductionVINode--------------------------------------
 289 // Vector multiply int as a reduction
 290 class MulReductionVINode : public ReductionNode {
 291 public:
 292   MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 293   virtual int Opcode() const;
 294   virtual const Type* bottom_type() const { return TypeInt::INT; }
 295   virtual uint ideal_reg() const { return Op_RegI; }
 296 };


< prev index next >