OLD | NEW |
---|---|
1 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===// | 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- 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 Operand class and its target-independent | 10 // This file declares the Operand class and its target-independent |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 // Constant is the abstract base class for constants. All | 97 // Constant is the abstract base class for constants. All |
98 // constants are allocated from a global arena and are pooled. | 98 // constants are allocated from a global arena and are pooled. |
99 class Constant : public Operand { | 99 class Constant : public Operand { |
100 Constant(const Constant &) = delete; | 100 Constant(const Constant &) = delete; |
101 Constant &operator=(const Constant &) = delete; | 101 Constant &operator=(const Constant &) = delete; |
102 | 102 |
103 public: | 103 public: |
104 void emitPoolLabel(Ostream &Str) const { | 104 void emitPoolLabel(Ostream &Str) const { |
105 Str << ".L$" << getType() << "$" << PoolEntryID; | 105 Str << ".L$" << getType() << "$" << PoolEntryID; |
106 } | 106 } |
107 using Operand::dump; | 107 using Operand::dump; |
Jim Stichnoth
2015/02/03 05:31:18
Can you also remove this line?
jvoung (off chromium)
2015/02/03 16:17:56
Done.
| |
108 void emit(const Cfg *Func) const override { emit(Func->getContext()); } | 108 void emit(const Cfg *Func) const override { emit(Func->getContext()); } |
109 virtual void emit(GlobalContext *Ctx) const = 0; | 109 virtual void emit(GlobalContext *Ctx) const = 0; |
110 void dump(const Cfg *Func, Ostream &Str) const = 0; | |
111 | 110 |
112 static bool classof(const Operand *Operand) { | 111 static bool classof(const Operand *Operand) { |
113 OperandKind Kind = Operand->getKind(); | 112 OperandKind Kind = Operand->getKind(); |
114 return Kind >= kConst_Base && Kind <= kConst_Num; | 113 return Kind >= kConst_Base && Kind <= kConst_Num; |
115 } | 114 } |
116 | 115 |
117 protected: | 116 protected: |
118 Constant(OperandKind Kind, Type Ty, uint32_t PoolEntryID) | 117 Constant(OperandKind Kind, Type Ty, uint32_t PoolEntryID) |
119 : Operand(Kind, Ty), PoolEntryID(PoolEntryID) { | 118 : Operand(Kind, Ty), PoolEntryID(PoolEntryID) { |
120 Vars = nullptr; | 119 Vars = nullptr; |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
623 private: | 622 private: |
624 const Cfg *Func; | 623 const Cfg *Func; |
625 MetadataKind Kind; | 624 MetadataKind Kind; |
626 std::vector<VariableTracking> Metadata; | 625 std::vector<VariableTracking> Metadata; |
627 const static InstDefList NoDefinitions; | 626 const static InstDefList NoDefinitions; |
628 }; | 627 }; |
629 | 628 |
630 } // end of namespace Ice | 629 } // end of namespace Ice |
631 | 630 |
632 #endif // SUBZERO_SRC_ICEOPERAND_H | 631 #endif // SUBZERO_SRC_ICEOPERAND_H |
OLD | NEW |