512 LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest) 513 : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) { 514 init_class_id(Class_LoadVector); 515 } 516 517 const TypeVect* vect_type() const { return type()->is_vect(); } 518 uint length() const { return vect_type()->length(); } // Vector length 519 520 virtual int Opcode() const; 521 522 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } 523 virtual BasicType memory_type() const { return T_VOID; } 524 virtual int memory_size() const { return vect_type()->length_in_bytes(); } 525 526 virtual int store_Opcode() const { return Op_StoreVector; } 527 528 static LoadVectorNode* make(int opc, Node* ctl, Node* mem, 529 Node* adr, const TypePtr* atyp, 530 uint vlen, BasicType bt, 531 ControlDependency control_dependency = LoadNode::DependsOnlyOnTest); 532 }; 533 534 //------------------------------StoreVectorNode-------------------------------- 535 // Store Vector to memory 536 class StoreVectorNode : public StoreNode { 537 public: 538 StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val) 539 : StoreNode(c, mem, adr, at, val, MemNode::unordered) { 540 assert(val->is_Vector() || val->is_LoadVector(), "sanity"); 541 init_class_id(Class_StoreVector); 542 } 543 544 const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); } 545 uint length() const { return vect_type()->length(); } // Vector length 546 547 virtual int Opcode() const; 548 549 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } 550 virtual BasicType memory_type() const { return T_VOID; } 551 virtual int memory_size() const { return vect_type()->length_in_bytes(); } 552 553 static StoreVectorNode* make(int opc, Node* ctl, Node* mem, 554 Node* adr, const TypePtr* atyp, Node* val, 555 uint vlen); 556 }; 557 558 559 //=========================Promote_Scalar_to_Vector============================ 560 561 //------------------------------ReplicateBNode--------------------------------- 562 // Replicate byte scalar to be vector 563 class ReplicateBNode : public VectorNode { 564 public: 565 ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} 566 virtual int Opcode() const; 567 }; 568 569 //------------------------------ReplicateSNode--------------------------------- 570 // Replicate short scalar to be vector 571 class ReplicateSNode : public VectorNode { 572 public: 573 ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} 574 virtual int Opcode() const; 575 }; | 512 LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest) 513 : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) { 514 init_class_id(Class_LoadVector); 515 } 516 517 const TypeVect* vect_type() const { return type()->is_vect(); } 518 uint length() const { return vect_type()->length(); } // Vector length 519 520 virtual int Opcode() const; 521 522 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } 523 virtual BasicType memory_type() const { return T_VOID; } 524 virtual int memory_size() const { return vect_type()->length_in_bytes(); } 525 526 virtual int store_Opcode() const { return Op_StoreVector; } 527 528 static LoadVectorNode* make(int opc, Node* ctl, Node* mem, 529 Node* adr, const TypePtr* atyp, 530 uint vlen, BasicType bt, 531 ControlDependency control_dependency = LoadNode::DependsOnlyOnTest); 532 uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); } 533 }; 534 535 //------------------------------StoreVectorNode-------------------------------- 536 // Store Vector to memory 537 class StoreVectorNode : public StoreNode { 538 public: 539 StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val) 540 : StoreNode(c, mem, adr, at, val, MemNode::unordered) { 541 assert(val->is_Vector() || val->is_LoadVector(), "sanity"); 542 init_class_id(Class_StoreVector); 543 } 544 545 const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); } 546 uint length() const { return vect_type()->length(); } // Vector length 547 548 virtual int Opcode() const; 549 550 virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); } 551 virtual BasicType memory_type() const { return T_VOID; } 552 virtual int memory_size() const { return vect_type()->length_in_bytes(); } 553 554 static StoreVectorNode* make(int opc, Node* ctl, Node* mem, 555 Node* adr, const TypePtr* atyp, Node* val, 556 uint vlen); 557 558 uint element_size(void) { return type2aelembytes(vect_type()->element_basic_type()); } 559 }; 560 561 562 //=========================Promote_Scalar_to_Vector============================ 563 564 //------------------------------ReplicateBNode--------------------------------- 565 // Replicate byte scalar to be vector 566 class ReplicateBNode : public VectorNode { 567 public: 568 ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} 569 virtual int Opcode() const; 570 }; 571 572 //------------------------------ReplicateSNode--------------------------------- 573 // Replicate short scalar to be vector 574 class ReplicateSNode : public VectorNode { 575 public: 576 ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} 577 virtual int Opcode() const; 578 }; |