| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return Str; | 94 return Str; |
| 95 } | 95 } |
| 96 | 96 |
| 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 uint32_t getPoolEntryID() const { return PoolEntryID; } | 104 void emitPoolLabel(Ostream &Str) const { |
| 105 Str << ".L$" << getType() << "$" << PoolEntryID; |
| 106 } |
| 105 using Operand::dump; | 107 using Operand::dump; |
| 106 void emit(const Cfg *Func) const override { emit(Func->getContext()); } | 108 void emit(const Cfg *Func) const override { emit(Func->getContext()); } |
| 107 virtual void emit(GlobalContext *Ctx) const = 0; | 109 virtual void emit(GlobalContext *Ctx) const = 0; |
| 108 void dump(const Cfg *Func, Ostream &Str) const = 0; | 110 void dump(const Cfg *Func, Ostream &Str) const = 0; |
| 109 | 111 |
| 110 static bool classof(const Operand *Operand) { | 112 static bool classof(const Operand *Operand) { |
| 111 OperandKind Kind = Operand->getKind(); | 113 OperandKind Kind = Operand->getKind(); |
| 112 return Kind >= kConst_Base && Kind <= kConst_Num; | 114 return Kind >= kConst_Base && Kind <= kConst_Num; |
| 113 } | 115 } |
| 114 | 116 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 private: | 625 private: |
| 624 const Cfg *Func; | 626 const Cfg *Func; |
| 625 MetadataKind Kind; | 627 MetadataKind Kind; |
| 626 std::vector<VariableTracking> Metadata; | 628 std::vector<VariableTracking> Metadata; |
| 627 const static InstDefList NoDefinitions; | 629 const static InstDefList NoDefinitions; |
| 628 }; | 630 }; |
| 629 | 631 |
| 630 } // end of namespace Ice | 632 } // end of namespace Ice |
| 631 | 633 |
| 632 #endif // SUBZERO_SRC_ICEOPERAND_H | 634 #endif // SUBZERO_SRC_ICEOPERAND_H |
| OLD | NEW |