OLD | NEW |
1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// | 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the Inst class and its target-independent | 10 // This file declares the Inst class and its target-independent |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Updates the status of the Variables contained within the | 95 // Updates the status of the Variables contained within the |
96 // instruction. In particular, it marks where the Dest variable is | 96 // instruction. In particular, it marks where the Dest variable is |
97 // first assigned, and it tracks whether variables are live across | 97 // first assigned, and it tracks whether variables are live across |
98 // basic blocks, i.e. used in a different block from their definition. | 98 // basic blocks, i.e. used in a different block from their definition. |
99 void updateVars(CfgNode *Node); | 99 void updateVars(CfgNode *Node); |
100 | 100 |
101 void livenessLightweight(llvm::BitVector &Live); | 101 void livenessLightweight(llvm::BitVector &Live); |
102 void liveness(InstNumberT InstNumber, llvm::BitVector &Live, | 102 void liveness(InstNumberT InstNumber, llvm::BitVector &Live, |
103 Liveness *Liveness, const CfgNode *Node); | 103 Liveness *Liveness, const CfgNode *Node); |
104 virtual void emit(const Cfg *Func) const; | 104 virtual void emit(const Cfg *Func) const; |
| 105 virtual void emitIAS(const Cfg *Func) const; |
105 virtual void dump(const Cfg *Func) const; | 106 virtual void dump(const Cfg *Func) const; |
106 virtual void dumpExtras(const Cfg *Func) const; | 107 virtual void dumpExtras(const Cfg *Func) const; |
107 void dumpDecorated(const Cfg *Func) const; | 108 void dumpDecorated(const Cfg *Func) const; |
108 void emitSources(const Cfg *Func) const; | 109 void emitSources(const Cfg *Func) const; |
109 void dumpSources(const Cfg *Func) const; | 110 void dumpSources(const Cfg *Func) const; |
110 void dumpDest(const Cfg *Func) const; | 111 void dumpDest(const Cfg *Func) const; |
111 virtual bool isRedundantAssign() const { return false; } | 112 virtual bool isRedundantAssign() const { return false; } |
112 | 113 |
113 virtual ~Inst() {} | 114 virtual ~Inst() {} |
114 | 115 |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 733 |
733 // This instruction is ignored if Linked->isDeleted() is true. | 734 // This instruction is ignored if Linked->isDeleted() is true. |
734 const Inst *Linked; | 735 const Inst *Linked; |
735 }; | 736 }; |
736 | 737 |
737 // The Target instruction is the base class for all target-specific | 738 // The Target instruction is the base class for all target-specific |
738 // instructions. | 739 // instructions. |
739 class InstTarget : public Inst { | 740 class InstTarget : public Inst { |
740 public: | 741 public: |
741 virtual void emit(const Cfg *Func) const = 0; | 742 virtual void emit(const Cfg *Func) const = 0; |
| 743 virtual void emitIAS(const Cfg *Func) const = 0; |
742 virtual void dump(const Cfg *Func) const; | 744 virtual void dump(const Cfg *Func) const; |
743 virtual void dumpExtras(const Cfg *Func) const; | 745 virtual void dumpExtras(const Cfg *Func) const; |
744 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; } | 746 static bool classof(const Inst *Inst) { return Inst->getKind() >= Target; } |
745 | 747 |
746 protected: | 748 protected: |
747 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) | 749 InstTarget(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) |
748 : Inst(Func, Kind, MaxSrcs, Dest) { | 750 : Inst(Func, Kind, MaxSrcs, Dest) { |
749 assert(Kind >= Target); | 751 assert(Kind >= Target); |
750 } | 752 } |
751 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION; | 753 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION; |
752 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION; | 754 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION; |
753 virtual ~InstTarget() {} | 755 virtual ~InstTarget() {} |
754 }; | 756 }; |
755 | 757 |
756 } // end of namespace Ice | 758 } // end of namespace Ice |
757 | 759 |
758 #endif // SUBZERO_SRC_ICEINST_H | 760 #endif // SUBZERO_SRC_ICEINST_H |
OLD | NEW |