< prev index next >

src/hotspot/share/opto/vectornode.hpp

Print this page
rev 53101 : 8214922: Add vectorization support for fmin/fmax
Reviewed-by: duke


 538   AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 539   virtual int Opcode() const;
 540 };
 541 
 542 //------------------------------OrVNode---------------------------------------
 543 // Vector or integer
 544 class OrVNode : public VectorNode {
 545  public:
 546   OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 547   virtual int Opcode() const;
 548 };
 549 
 550 //------------------------------XorVNode---------------------------------------
 551 // Vector xor integer
 552 class XorVNode : public VectorNode {
 553  public:
 554   XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 555   virtual int Opcode() const;
 556 };
 557 








































































 558 //================================= M E M O R Y ===============================
 559 
 560 //------------------------------LoadVectorNode---------------------------------
 561 // Load Vector from memory
 562 class LoadVectorNode : public LoadNode {
 563  public:
 564   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
 565     : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
 566     init_class_id(Class_LoadVector);
 567     set_mismatched_access();
 568   }
 569 
 570   const TypeVect* vect_type() const { return type()->is_vect(); }
 571   uint length() const { return vect_type()->length(); } // Vector length
 572 
 573   virtual int Opcode() const;
 574 
 575   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 576   virtual BasicType memory_type() const { return T_VOID; }
 577   virtual int memory_size() const { return vect_type()->length_in_bytes(); }




 538   AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 539   virtual int Opcode() const;
 540 };
 541 
 542 //------------------------------OrVNode---------------------------------------
 543 // Vector or integer
 544 class OrVNode : public VectorNode {
 545  public:
 546   OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 547   virtual int Opcode() const;
 548 };
 549 
 550 //------------------------------XorVNode---------------------------------------
 551 // Vector xor integer
 552 class XorVNode : public VectorNode {
 553  public:
 554   XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 555   virtual int Opcode() const;
 556 };
 557 
 558 //------------------------------MinVNode--------------------------------------
 559 // Vector min
 560 class MinVNode : public VectorNode {
 561 public:
 562   MinVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 563   virtual int Opcode() const;
 564 };
 565 
 566 //------------------------------MaxVNode--------------------------------------
 567 // Vector max
 568 class MaxVNode : public VectorNode {
 569 public:
 570   MaxVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
 571   virtual int Opcode() const;
 572 };
 573 
 574 //------------------------------MinReductionVNode--------------------------------------
 575 // Vector min as a reduction
 576 class MinReductionVNode : public ReductionNode {
 577 public:
 578   MinReductionVNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 579   virtual int Opcode() const;
 580   virtual const Type* bottom_type() const {
 581     BasicType bt = in(1)->bottom_type()->basic_type();
 582     if (bt == T_FLOAT) {
 583       return Type::FLOAT;
 584     } else if (bt == T_DOUBLE) {
 585       return Type::DOUBLE;
 586     }
 587     assert(false, "unsupported basic type");
 588     return NULL;
 589   }
 590   virtual uint ideal_reg() const {
 591     BasicType bt = in(1)->bottom_type()->basic_type();
 592     if (bt == T_FLOAT) {
 593       return Op_RegF;
 594     } else if (bt == T_DOUBLE) {
 595       return Op_RegD;
 596     }
 597     assert(false, "unsupported basic type");
 598     return 0;
 599   }
 600 };
 601 
 602 //------------------------------MaxReductionVNode--------------------------------------
 603 // Vector max as a reduction
 604 class MaxReductionVNode : public ReductionNode {
 605 public:
 606   MaxReductionVNode(Node *ctrl, Node* in1, Node* in2) : ReductionNode(ctrl, in1, in2) {}
 607   virtual int Opcode() const;
 608   virtual const Type* bottom_type() const {
 609     BasicType bt = in(1)->bottom_type()->basic_type();
 610     if (bt == T_FLOAT) {
 611       return Type::FLOAT;
 612     } else {
 613       return Type::DOUBLE;
 614     }
 615     assert(false, "unsupported basic type");
 616     return NULL;
 617   }
 618   virtual uint ideal_reg() const {
 619     BasicType bt = in(1)->bottom_type()->basic_type();
 620     if (bt == T_FLOAT) {
 621       return Op_RegF;
 622     } else {
 623       return Op_RegD;
 624     }
 625     assert(false, "unsupported basic type");
 626     return 0;
 627   }
 628 };
 629 
 630 //================================= M E M O R Y ===============================
 631 
 632 //------------------------------LoadVectorNode---------------------------------
 633 // Load Vector from memory
 634 class LoadVectorNode : public LoadNode {
 635  public:
 636   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
 637     : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
 638     init_class_id(Class_LoadVector);
 639     set_mismatched_access();
 640   }
 641 
 642   const TypeVect* vect_type() const { return type()->is_vect(); }
 643   uint length() const { return vect_type()->length(); } // Vector length
 644 
 645   virtual int Opcode() const;
 646 
 647   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 648   virtual BasicType memory_type() const { return T_VOID; }
 649   virtual int memory_size() const { return vect_type()->length_in_bytes(); }


< prev index next >