< prev index next >

src/share/vm/opto/vectornode.hpp

Print this page
rev 8739 : 8004073: Implement C2 Ideal node specific dump() method
Summary: add Node::dump_rel() to dump a node and its related nodes (the notion of "related" depends on the node at hand); add Node::dump_comp() to dump a node in compact representation; add Node::dump_rel_comp() to dump a node and its related nodes in compact representation; add the required machinery; extend some C2 IR nodes with compact and related dumping
Reviewed-by:
   1 /*
   2  * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


  55   static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
  56   static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
  57   static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
  58 
  59   static int  opcode(int opc, BasicType bt);
  60   static bool implemented(int opc, uint vlen, BasicType bt);
  61   static bool is_shift(Node* n);
  62   static bool is_invariant_vector(Node* n);
  63   // [Start, end) half-open range defining which operands are vectors
  64   static void vector_operands(Node* n, uint* start, uint* end);
  65 };
  66 
  67 //===========================Vector=ALU=Operations=============================
  68 
  69 //------------------------------AddVBNode--------------------------------------
  70 // Vector add byte
  71 class AddVBNode : public VectorNode {
  72  public:
  73   AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  74   virtual int Opcode() const;




  75 };
  76 
  77 //------------------------------AddVSNode--------------------------------------
  78 // Vector add char/short
  79 class AddVSNode : public VectorNode {
  80  public:
  81   AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  82   virtual int Opcode() const;




  83 };
  84 
  85 //------------------------------AddVINode--------------------------------------
  86 // Vector add int
  87 class AddVINode : public VectorNode {
  88  public:
  89   AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  90   virtual int Opcode() const;




  91 };
  92 
  93 //------------------------------AddVLNode--------------------------------------
  94 // Vector add long
  95 class AddVLNode : public VectorNode {
  96 public:
  97   AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
  98   virtual int Opcode() const;




  99 };
 100 
 101 //------------------------------AddVFNode--------------------------------------
 102 // Vector add float
 103 class AddVFNode : public VectorNode {
 104 public:
 105   AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 106   virtual int Opcode() const;




 107 };
 108 
 109 //------------------------------AddVDNode--------------------------------------
 110 // Vector add double
 111 class AddVDNode : public VectorNode {
 112 public:
 113   AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 114   virtual int Opcode() const;




 115 };
 116 
 117 //------------------------------ReductionNode------------------------------------
 118 // Perform reduction of a vector
 119 class ReductionNode : public Node {
 120  public:
 121   ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {}
 122 
 123   static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt);
 124   static int  opcode(int opc, BasicType bt);
 125   static bool implemented(int opc, uint vlen, BasicType bt);




 126 };
 127 
 128 //------------------------------AddReductionVINode--------------------------------------
 129 // Vector add int as a reduction
 130 class AddReductionVINode : public ReductionNode {
 131 public:
 132   AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 133   virtual int Opcode() const;
 134   virtual const Type* bottom_type() const { return TypeInt::INT; }
 135   virtual uint ideal_reg() const { return Op_RegI; }
 136 };
 137 
 138 //------------------------------AddReductionVLNode--------------------------------------
 139 // Vector add long as a reduction
 140 class AddReductionVLNode : public ReductionNode {
 141 public:
 142   AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 143   virtual int Opcode() const;
 144   virtual const Type* bottom_type() const { return TypeLong::LONG; }
 145   virtual uint ideal_reg() const { return Op_RegL; }


 154   virtual const Type* bottom_type() const { return Type::FLOAT; }
 155   virtual uint ideal_reg() const { return Op_RegF; }
 156 };
 157 
 158 //------------------------------AddReductionVDNode--------------------------------------
 159 // Vector add double as a reduction
 160 class AddReductionVDNode : public ReductionNode {
 161 public:
 162   AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 163   virtual int Opcode() const;
 164   virtual const Type* bottom_type() const { return Type::DOUBLE; }
 165   virtual uint ideal_reg() const { return Op_RegD; }
 166 };
 167 
 168 //------------------------------SubVBNode--------------------------------------
 169 // Vector subtract byte
 170 class SubVBNode : public VectorNode {
 171  public:
 172   SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 173   virtual int Opcode() const;




 174 };
 175 
 176 //------------------------------SubVSNode--------------------------------------
 177 // Vector subtract short
 178 class SubVSNode : public VectorNode {
 179  public:
 180   SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 181   virtual int Opcode() const;




 182 };
 183 
 184 //------------------------------SubVINode--------------------------------------
 185 // Vector subtract int
 186 class SubVINode : public VectorNode {
 187  public:
 188   SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 189   virtual int Opcode() const;




 190 };
 191 
 192 //------------------------------SubVLNode--------------------------------------
 193 // Vector subtract long
 194 class SubVLNode : public VectorNode {
 195  public:
 196   SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 197   virtual int Opcode() const;




 198 };
 199 
 200 //------------------------------SubVFNode--------------------------------------
 201 // Vector subtract float
 202 class SubVFNode : public VectorNode {
 203  public:
 204   SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 205   virtual int Opcode() const;




 206 };
 207 
 208 //------------------------------SubVDNode--------------------------------------
 209 // Vector subtract double
 210 class SubVDNode : public VectorNode {
 211  public:
 212   SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 213   virtual int Opcode() const;




 214 };
 215 
 216 //------------------------------MulVSNode--------------------------------------
 217 // Vector multiply short
 218 class MulVSNode : public VectorNode {
 219  public:
 220   MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 221   virtual int Opcode() const;




 222 };
 223 
 224 //------------------------------MulVINode--------------------------------------
 225 // Vector multiply int
 226 class MulVINode : public VectorNode {
 227  public:
 228   MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 229   virtual int Opcode() const;




 230 };
 231 
 232 //------------------------------MulVLNode--------------------------------------
 233 // Vector multiply long
 234 class MulVLNode : public VectorNode {
 235 public:
 236   MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 237   virtual int Opcode() const;
 238 };
 239 
 240 //------------------------------MulVFNode--------------------------------------
 241 // Vector multiply float
 242 class MulVFNode : public VectorNode {
 243 public:
 244   MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 245   virtual int Opcode() const;




 246 };
 247 
 248 //------------------------------MulVDNode--------------------------------------
 249 // Vector multiply double
 250 class MulVDNode : public VectorNode {
 251 public:
 252   MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 253   virtual int Opcode() const;




 254 };
 255 
 256 //------------------------------MulReductionVINode--------------------------------------
 257 // Vector multiply int as a reduction
 258 class MulReductionVINode : public ReductionNode {
 259 public:
 260   MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 261   virtual int Opcode() const;
 262   virtual const Type* bottom_type() const { return TypeInt::INT; }
 263   virtual uint ideal_reg() const { return Op_RegI; }
 264 };
 265 
 266 //------------------------------MulReductionVLNode--------------------------------------
 267 // Vector multiply int as a reduction
 268 class MulReductionVLNode : public ReductionNode {
 269 public:
 270   MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 271   virtual int Opcode() const;
 272   virtual const Type* bottom_type() const { return TypeLong::LONG; }
 273   virtual uint ideal_reg() const { return Op_RegI; }


 282   virtual const Type* bottom_type() const { return Type::FLOAT; }
 283   virtual uint ideal_reg() const { return Op_RegF; }
 284 };
 285 
 286 //------------------------------MulReductionVDNode--------------------------------------
 287 // Vector multiply double as a reduction
 288 class MulReductionVDNode : public ReductionNode {
 289 public:
 290   MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 291   virtual int Opcode() const;
 292   virtual const Type* bottom_type() const { return Type::DOUBLE; }
 293   virtual uint ideal_reg() const { return Op_RegD; }
 294 };
 295 
 296 //------------------------------DivVFNode--------------------------------------
 297 // Vector divide float
 298 class DivVFNode : public VectorNode {
 299  public:
 300   DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 301   virtual int Opcode() const;




 302 };
 303 
 304 //------------------------------DivVDNode--------------------------------------
 305 // Vector Divide double
 306 class DivVDNode : public VectorNode {
 307  public:
 308   DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 309   virtual int Opcode() const;




 310 };
 311 
 312 //------------------------------LShiftVBNode-----------------------------------
 313 // Vector left shift bytes
 314 class LShiftVBNode : public VectorNode {
 315  public:
 316   LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 317   virtual int Opcode() const;




 318 };
 319 
 320 //------------------------------LShiftVSNode-----------------------------------
 321 // Vector left shift shorts
 322 class LShiftVSNode : public VectorNode {
 323  public:
 324   LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 325   virtual int Opcode() const;




 326 };
 327 
 328 //------------------------------LShiftVINode-----------------------------------
 329 // Vector left shift ints
 330 class LShiftVINode : public VectorNode {
 331  public:
 332   LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 333   virtual int Opcode() const;




 334 };
 335 
 336 //------------------------------LShiftVLNode-----------------------------------
 337 // Vector left shift longs
 338 class LShiftVLNode : public VectorNode {
 339  public:
 340   LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 341   virtual int Opcode() const;




 342 };
 343 
 344 //------------------------------RShiftVBNode-----------------------------------
 345 // Vector right arithmetic (signed) shift bytes
 346 class RShiftVBNode : public VectorNode {
 347  public:
 348   RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 349   virtual int Opcode() const;




 350 };
 351 
 352 //------------------------------RShiftVSNode-----------------------------------
 353 // Vector right arithmetic (signed) shift shorts
 354 class RShiftVSNode : public VectorNode {
 355  public:
 356   RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 357   virtual int Opcode() const;




 358 };
 359 
 360 //------------------------------RShiftVINode-----------------------------------
 361 // Vector right arithmetic (signed) shift ints
 362 class RShiftVINode : public VectorNode {
 363  public:
 364   RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 365   virtual int Opcode() const;




 366 };
 367 
 368 //------------------------------RShiftVLNode-----------------------------------
 369 // Vector right arithmetic (signed) shift longs
 370 class RShiftVLNode : public VectorNode {
 371  public:
 372   RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 373   virtual int Opcode() const;




 374 };
 375 
 376 //------------------------------URShiftVBNode----------------------------------
 377 // Vector right logical (unsigned) shift bytes
 378 class URShiftVBNode : public VectorNode {
 379  public:
 380   URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 381   virtual int Opcode() const;




 382 };
 383 
 384 //------------------------------URShiftVSNode----------------------------------
 385 // Vector right logical (unsigned) shift shorts
 386 class URShiftVSNode : public VectorNode {
 387  public:
 388   URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 389   virtual int Opcode() const;




 390 };
 391 
 392 //------------------------------URShiftVINode----------------------------------
 393 // Vector right logical (unsigned) shift ints
 394 class URShiftVINode : public VectorNode {
 395  public:
 396   URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 397   virtual int Opcode() const;




 398 };
 399 
 400 //------------------------------URShiftVLNode----------------------------------
 401 // Vector right logical (unsigned) shift longs
 402 class URShiftVLNode : public VectorNode {
 403  public:
 404   URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 405   virtual int Opcode() const;




 406 };
 407 
 408 //------------------------------LShiftCntVNode---------------------------------
 409 // Vector left shift count
 410 class LShiftCntVNode : public VectorNode {
 411  public:
 412   LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
 413   virtual int Opcode() const;
 414   virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
 415 };
 416 
 417 //------------------------------RShiftCntVNode---------------------------------
 418 // Vector right shift count
 419 class RShiftCntVNode : public VectorNode {
 420  public:
 421   RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
 422   virtual int Opcode() const;
 423   virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
 424 };
 425 
 426 
 427 //------------------------------AndVNode---------------------------------------
 428 // Vector and integer
 429 class AndVNode : public VectorNode {
 430  public:
 431   AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 432   virtual int Opcode() const;




 433 };
 434 
 435 //------------------------------OrVNode---------------------------------------
 436 // Vector or integer
 437 class OrVNode : public VectorNode {
 438  public:
 439   OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 440   virtual int Opcode() const;




 441 };
 442 
 443 //------------------------------XorVNode---------------------------------------
 444 // Vector xor integer
 445 class XorVNode : public VectorNode {
 446  public:
 447   XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 448   virtual int Opcode() const;




 449 };
 450 
 451 //================================= M E M O R Y ===============================
 452 
 453 //------------------------------LoadVectorNode---------------------------------
 454 // Load Vector from memory
 455 class LoadVectorNode : public LoadNode {
 456  public:
 457   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
 458     : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
 459     init_class_id(Class_LoadVector);
 460   }
 461 
 462   const TypeVect* vect_type() const { return type()->is_vect(); }
 463   uint length() const { return vect_type()->length(); } // Vector length
 464 
 465   virtual int Opcode() const;
 466 
 467   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 468   virtual BasicType memory_type() const { return T_VOID; }


   1 /*
   2  * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */


  55   static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
  56   static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
  57   static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
  58 
  59   static int  opcode(int opc, BasicType bt);
  60   static bool implemented(int opc, uint vlen, BasicType bt);
  61   static bool is_shift(Node* n);
  62   static bool is_invariant_vector(Node* n);
  63   // [Start, end) half-open range defining which operands are vectors
  64   static void vector_operands(Node* n, uint* start, uint* end);
  65 };
  66 
  67 //===========================Vector=ALU=Operations=============================
  68 
  69 //------------------------------AddVBNode--------------------------------------
  70 // Vector add byte
  71 class AddVBNode : public VectorNode {
  72  public:
  73   AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  74   virtual int Opcode() const;
  75 
  76 #ifndef PRODUCT
  77   REL_IN_DATA_OUT_1;
  78 #endif
  79 };
  80 
  81 //------------------------------AddVSNode--------------------------------------
  82 // Vector add char/short
  83 class AddVSNode : public VectorNode {
  84  public:
  85   AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  86   virtual int Opcode() const;
  87 
  88 #ifndef PRODUCT
  89   REL_IN_DATA_OUT_1;
  90 #endif
  91 };
  92 
  93 //------------------------------AddVINode--------------------------------------
  94 // Vector add int
  95 class AddVINode : public VectorNode {
  96  public:
  97   AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  98   virtual int Opcode() const;
  99 
 100 #ifndef PRODUCT
 101   REL_IN_DATA_OUT_1;
 102 #endif
 103 };
 104 
 105 //------------------------------AddVLNode--------------------------------------
 106 // Vector add long
 107 class AddVLNode : public VectorNode {
 108 public:
 109   AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 110   virtual int Opcode() const;
 111 
 112 #ifndef PRODUCT
 113   REL_IN_DATA_OUT_1;
 114 #endif
 115 };
 116 
 117 //------------------------------AddVFNode--------------------------------------
 118 // Vector add float
 119 class AddVFNode : public VectorNode {
 120 public:
 121   AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 122   virtual int Opcode() const;
 123 
 124 #ifndef PRODUCT
 125   REL_IN_DATA_OUT_1;
 126 #endif
 127 };
 128 
 129 //------------------------------AddVDNode--------------------------------------
 130 // Vector add double
 131 class AddVDNode : public VectorNode {
 132 public:
 133   AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 134   virtual int Opcode() const;
 135 
 136 #ifndef PRODUCT
 137   REL_IN_DATA_OUT_1;
 138 #endif
 139 };
 140 
 141 //------------------------------ReductionNode------------------------------------
 142 // Perform reduction of a vector
 143 class ReductionNode : public Node {
 144  public:
 145   ReductionNode(Node *ctrl, Node* in1, Node* in2) : Node(ctrl, in1, in2) {}
 146 
 147   static ReductionNode* make(int opc, Node *ctrl, Node* in1, Node* in2, BasicType bt);
 148   static int  opcode(int opc, BasicType bt);
 149   static bool implemented(int opc, uint vlen, BasicType bt);
 150 
 151 #ifndef PRODUCT
 152   REL_IN_DATA_OUT_1;
 153 #endif
 154 };
 155 
 156 //------------------------------AddReductionVINode--------------------------------------
 157 // Vector add int as a reduction
 158 class AddReductionVINode : public ReductionNode {
 159 public:
 160   AddReductionVINode(Node * ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 161   virtual int Opcode() const;
 162   virtual const Type* bottom_type() const { return TypeInt::INT; }
 163   virtual uint ideal_reg() const { return Op_RegI; }
 164 };
 165 
 166 //------------------------------AddReductionVLNode--------------------------------------
 167 // Vector add long as a reduction
 168 class AddReductionVLNode : public ReductionNode {
 169 public:
 170   AddReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 171   virtual int Opcode() const;
 172   virtual const Type* bottom_type() const { return TypeLong::LONG; }
 173   virtual uint ideal_reg() const { return Op_RegL; }


 182   virtual const Type* bottom_type() const { return Type::FLOAT; }
 183   virtual uint ideal_reg() const { return Op_RegF; }
 184 };
 185 
 186 //------------------------------AddReductionVDNode--------------------------------------
 187 // Vector add double as a reduction
 188 class AddReductionVDNode : public ReductionNode {
 189 public:
 190   AddReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 191   virtual int Opcode() const;
 192   virtual const Type* bottom_type() const { return Type::DOUBLE; }
 193   virtual uint ideal_reg() const { return Op_RegD; }
 194 };
 195 
 196 //------------------------------SubVBNode--------------------------------------
 197 // Vector subtract byte
 198 class SubVBNode : public VectorNode {
 199  public:
 200   SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 201   virtual int Opcode() const;
 202 
 203 #ifndef PRODUCT
 204   REL_IN_DATA_OUT_1;
 205 #endif
 206 };
 207 
 208 //------------------------------SubVSNode--------------------------------------
 209 // Vector subtract short
 210 class SubVSNode : public VectorNode {
 211  public:
 212   SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 213   virtual int Opcode() const;
 214 
 215 #ifndef PRODUCT
 216   REL_IN_DATA_OUT_1;
 217 #endif
 218 };
 219 
 220 //------------------------------SubVINode--------------------------------------
 221 // Vector subtract int
 222 class SubVINode : public VectorNode {
 223  public:
 224   SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 225   virtual int Opcode() const;
 226 
 227 #ifndef PRODUCT
 228   REL_IN_DATA_OUT_1;
 229 #endif
 230 };
 231 
 232 //------------------------------SubVLNode--------------------------------------
 233 // Vector subtract long
 234 class SubVLNode : public VectorNode {
 235  public:
 236   SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 237   virtual int Opcode() const;
 238 
 239 #ifndef PRODUCT
 240   REL_IN_DATA_OUT_1;
 241 #endif
 242 };
 243 
 244 //------------------------------SubVFNode--------------------------------------
 245 // Vector subtract float
 246 class SubVFNode : public VectorNode {
 247  public:
 248   SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 249   virtual int Opcode() const;
 250 
 251 #ifndef PRODUCT
 252   REL_IN_DATA_OUT_1;
 253 #endif
 254 };
 255 
 256 //------------------------------SubVDNode--------------------------------------
 257 // Vector subtract double
 258 class SubVDNode : public VectorNode {
 259  public:
 260   SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 261   virtual int Opcode() const;
 262 
 263 #ifndef PRODUCT
 264   REL_IN_DATA_OUT_1;
 265 #endif
 266 };
 267 
 268 //------------------------------MulVSNode--------------------------------------
 269 // Vector multiply short
 270 class MulVSNode : public VectorNode {
 271  public:
 272   MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 273   virtual int Opcode() const;
 274 
 275 #ifndef PRODUCT
 276   REL_IN_DATA_OUT_1;
 277 #endif
 278 };
 279 
 280 //------------------------------MulVINode--------------------------------------
 281 // Vector multiply int
 282 class MulVINode : public VectorNode {
 283  public:
 284   MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 285   virtual int Opcode() const;
 286 
 287 #ifndef PRODUCT
 288   REL_IN_DATA_OUT_1;
 289 #endif
 290 };
 291 
 292 //------------------------------MulVLNode--------------------------------------
 293 // Vector multiply long
 294 class MulVLNode : public VectorNode {
 295 public:
 296   MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 297   virtual int Opcode() const;
 298 };
 299 
 300 //------------------------------MulVFNode--------------------------------------
 301 // Vector multiply float
 302 class MulVFNode : public VectorNode {
 303 public:
 304   MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 305   virtual int Opcode() const;
 306 
 307 #ifndef PRODUCT
 308   REL_IN_DATA_OUT_1;
 309 #endif
 310 };
 311 
 312 //------------------------------MulVDNode--------------------------------------
 313 // Vector multiply double
 314 class MulVDNode : public VectorNode {
 315 public:
 316   MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 317   virtual int Opcode() const;
 318 
 319 #ifndef PRODUCT
 320   REL_IN_DATA_OUT_1;
 321 #endif
 322 };
 323 
 324 //------------------------------MulReductionVINode--------------------------------------
 325 // Vector multiply int as a reduction
 326 class MulReductionVINode : public ReductionNode {
 327 public:
 328   MulReductionVINode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 329   virtual int Opcode() const;
 330   virtual const Type* bottom_type() const { return TypeInt::INT; }
 331   virtual uint ideal_reg() const { return Op_RegI; }
 332 };
 333 
 334 //------------------------------MulReductionVLNode--------------------------------------
 335 // Vector multiply int as a reduction
 336 class MulReductionVLNode : public ReductionNode {
 337 public:
 338   MulReductionVLNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 339   virtual int Opcode() const;
 340   virtual const Type* bottom_type() const { return TypeLong::LONG; }
 341   virtual uint ideal_reg() const { return Op_RegI; }


 350   virtual const Type* bottom_type() const { return Type::FLOAT; }
 351   virtual uint ideal_reg() const { return Op_RegF; }
 352 };
 353 
 354 //------------------------------MulReductionVDNode--------------------------------------
 355 // Vector multiply double as a reduction
 356 class MulReductionVDNode : public ReductionNode {
 357 public:
 358   MulReductionVDNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 359   virtual int Opcode() const;
 360   virtual const Type* bottom_type() const { return Type::DOUBLE; }
 361   virtual uint ideal_reg() const { return Op_RegD; }
 362 };
 363 
 364 //------------------------------DivVFNode--------------------------------------
 365 // Vector divide float
 366 class DivVFNode : public VectorNode {
 367  public:
 368   DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 369   virtual int Opcode() const;
 370 
 371 #ifndef PRODUCT
 372   REL_IN_DATA_OUT_1;
 373 #endif
 374 };
 375 
 376 //------------------------------DivVDNode--------------------------------------
 377 // Vector Divide double
 378 class DivVDNode : public VectorNode {
 379  public:
 380   DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 381   virtual int Opcode() const;
 382 
 383 #ifndef PRODUCT
 384   REL_IN_DATA_OUT_1;
 385 #endif
 386 };
 387 
 388 //------------------------------LShiftVBNode-----------------------------------
 389 // Vector left shift bytes
 390 class LShiftVBNode : public VectorNode {
 391  public:
 392   LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 393   virtual int Opcode() const;
 394 
 395 #ifndef PRODUCT
 396   REL_IN_DATA_OUT_1;
 397 #endif
 398 };
 399 
 400 //------------------------------LShiftVSNode-----------------------------------
 401 // Vector left shift shorts
 402 class LShiftVSNode : public VectorNode {
 403  public:
 404   LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 405   virtual int Opcode() const;
 406 
 407 #ifndef PRODUCT
 408   REL_IN_DATA_OUT_1;
 409 #endif
 410 };
 411 
 412 //------------------------------LShiftVINode-----------------------------------
 413 // Vector left shift ints
 414 class LShiftVINode : public VectorNode {
 415  public:
 416   LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 417   virtual int Opcode() const;
 418 
 419 #ifndef PRODUCT
 420   REL_IN_DATA_OUT_1;
 421 #endif
 422 };
 423 
 424 //------------------------------LShiftVLNode-----------------------------------
 425 // Vector left shift longs
 426 class LShiftVLNode : public VectorNode {
 427  public:
 428   LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 429   virtual int Opcode() const;
 430 
 431 #ifndef PRODUCT
 432   REL_IN_DATA_OUT_1;
 433 #endif
 434 };
 435 
 436 //------------------------------RShiftVBNode-----------------------------------
 437 // Vector right arithmetic (signed) shift bytes
 438 class RShiftVBNode : public VectorNode {
 439  public:
 440   RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 441   virtual int Opcode() const;
 442 
 443 #ifndef PRODUCT
 444   REL_IN_DATA_OUT_1;
 445 #endif
 446 };
 447 
 448 //------------------------------RShiftVSNode-----------------------------------
 449 // Vector right arithmetic (signed) shift shorts
 450 class RShiftVSNode : public VectorNode {
 451  public:
 452   RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 453   virtual int Opcode() const;
 454 
 455 #ifndef PRODUCT
 456   REL_IN_DATA_OUT_1;
 457 #endif
 458 };
 459 
 460 //------------------------------RShiftVINode-----------------------------------
 461 // Vector right arithmetic (signed) shift ints
 462 class RShiftVINode : public VectorNode {
 463  public:
 464   RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 465   virtual int Opcode() const;
 466 
 467 #ifndef PRODUCT
 468   REL_IN_DATA_OUT_1;
 469 #endif
 470 };
 471 
 472 //------------------------------RShiftVLNode-----------------------------------
 473 // Vector right arithmetic (signed) shift longs
 474 class RShiftVLNode : public VectorNode {
 475  public:
 476   RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 477   virtual int Opcode() const;
 478 
 479 #ifndef PRODUCT
 480   REL_IN_DATA_OUT_1;
 481 #endif
 482 };
 483 
 484 //------------------------------URShiftVBNode----------------------------------
 485 // Vector right logical (unsigned) shift bytes
 486 class URShiftVBNode : public VectorNode {
 487  public:
 488   URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 489   virtual int Opcode() const;
 490 
 491 #ifndef PRODUCT
 492   REL_IN_DATA_OUT_1;
 493 #endif
 494 };
 495 
 496 //------------------------------URShiftVSNode----------------------------------
 497 // Vector right logical (unsigned) shift shorts
 498 class URShiftVSNode : public VectorNode {
 499  public:
 500   URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 501   virtual int Opcode() const;
 502 
 503 #ifndef PRODUCT
 504   REL_IN_DATA_OUT_1;
 505 #endif
 506 };
 507 
 508 //------------------------------URShiftVINode----------------------------------
 509 // Vector right logical (unsigned) shift ints
 510 class URShiftVINode : public VectorNode {
 511  public:
 512   URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 513   virtual int Opcode() const;
 514 
 515 #ifndef PRODUCT
 516   REL_IN_DATA_OUT_1;
 517 #endif
 518 };
 519 
 520 //------------------------------URShiftVLNode----------------------------------
 521 // Vector right logical (unsigned) shift longs
 522 class URShiftVLNode : public VectorNode {
 523  public:
 524   URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 525   virtual int Opcode() const;
 526 
 527 #ifndef PRODUCT
 528   REL_IN_DATA_OUT_1;
 529 #endif
 530 };
 531 
 532 //------------------------------LShiftCntVNode---------------------------------
 533 // Vector left shift count
 534 class LShiftCntVNode : public VectorNode {
 535  public:
 536   LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
 537   virtual int Opcode() const;
 538   virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
 539 };
 540 
 541 //------------------------------RShiftCntVNode---------------------------------
 542 // Vector right shift count
 543 class RShiftCntVNode : public VectorNode {
 544  public:
 545   RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
 546   virtual int Opcode() const;
 547   virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
 548 };
 549 
 550 
 551 //------------------------------AndVNode---------------------------------------
 552 // Vector and integer
 553 class AndVNode : public VectorNode {
 554  public:
 555   AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 556   virtual int Opcode() const;
 557 
 558 #ifndef PRODUCT
 559   REL_IN_DATA_OUT_1;
 560 #endif
 561 };
 562 
 563 //------------------------------OrVNode---------------------------------------
 564 // Vector or integer
 565 class OrVNode : public VectorNode {
 566  public:
 567   OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 568   virtual int Opcode() const;
 569 
 570 #ifndef PRODUCT
 571   REL_IN_DATA_OUT_1;
 572 #endif
 573 };
 574 
 575 //------------------------------XorVNode---------------------------------------
 576 // Vector xor integer
 577 class XorVNode : public VectorNode {
 578  public:
 579   XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 580   virtual int Opcode() const;
 581 
 582 #ifndef PRODUCT
 583   REL_IN_DATA_OUT_1;
 584 #endif
 585 };
 586 
 587 //================================= M E M O R Y ===============================
 588 
 589 //------------------------------LoadVectorNode---------------------------------
 590 // Load Vector from memory
 591 class LoadVectorNode : public LoadNode {
 592  public:
 593   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
 594     : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
 595     init_class_id(Class_LoadVector);
 596   }
 597 
 598   const TypeVect* vect_type() const { return type()->is_vect(); }
 599   uint length() const { return vect_type()->length(); } // Vector length
 600 
 601   virtual int Opcode() const;
 602 
 603   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 604   virtual BasicType memory_type() const { return T_VOID; }


< prev index next >