641
642 // Check for identity function on memory (Load then Store at same address)
643 virtual Node* Identity(PhaseGVN* phase);
644
645 // Do not match memory edge
646 virtual uint match_edge(uint idx) const;
647
648 virtual const Type *bottom_type() const; // returns Type::MEMORY
649
650 // Map a store opcode to its corresponding own opcode, trivially.
651 virtual int store_Opcode() const { return Opcode(); }
652
653 // have all possible loads of the value stored been optimized away?
654 bool value_never_loaded(PhaseValues* phase) const;
655
656 bool has_reinterpret_variant(const Type* vt);
657 Node* convert_to_reinterpret_store(PhaseGVN& gvn, Node* val, const Type* vt);
658
659 MemBarNode* trailing_membar() const;
660
661 private:
662 virtual bool depends_only_on_test_impl() const { return false; }
663 };
664
665 //------------------------------StoreBNode-------------------------------------
666 // Store byte to memory
667 class StoreBNode : public StoreNode {
668 public:
669 StoreBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
670 : StoreNode(c, mem, adr, at, val, mo) {}
671 virtual int Opcode() const;
672 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
673 virtual BasicType value_basic_type() const { return T_BYTE; }
674 };
675
676 //------------------------------StoreCNode-------------------------------------
677 // Store char/short to memory
678 class StoreCNode : public StoreNode {
679 public:
680 StoreCNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
|
641
642 // Check for identity function on memory (Load then Store at same address)
643 virtual Node* Identity(PhaseGVN* phase);
644
645 // Do not match memory edge
646 virtual uint match_edge(uint idx) const;
647
648 virtual const Type *bottom_type() const; // returns Type::MEMORY
649
650 // Map a store opcode to its corresponding own opcode, trivially.
651 virtual int store_Opcode() const { return Opcode(); }
652
653 // have all possible loads of the value stored been optimized away?
654 bool value_never_loaded(PhaseValues* phase) const;
655
656 bool has_reinterpret_variant(const Type* vt);
657 Node* convert_to_reinterpret_store(PhaseGVN& gvn, Node* val, const Type* vt);
658
659 MemBarNode* trailing_membar() const;
660
661 #ifndef PRODUCT
662 virtual void dump_spec(outputStream *st) const {
663 MemNode::dump_spec(st);
664 if (is_release()) st->print("is_release");
665 }
666 #endif
667
668 private:
669 virtual bool depends_only_on_test_impl() const { return false; }
670 };
671
672 //------------------------------StoreBNode-------------------------------------
673 // Store byte to memory
674 class StoreBNode : public StoreNode {
675 public:
676 StoreBNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
677 : StoreNode(c, mem, adr, at, val, mo) {}
678 virtual int Opcode() const;
679 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
680 virtual BasicType value_basic_type() const { return T_BYTE; }
681 };
682
683 //------------------------------StoreCNode-------------------------------------
684 // Store char/short to memory
685 class StoreCNode : public StoreNode {
686 public:
687 StoreCNode(Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, MemOrd mo)
|