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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 assert(Func); | 74 assert(Func); |
75 dump(Func, Func->getContext()->getStrDump()); | 75 dump(Func, Func->getContext()->getStrDump()); |
76 } | 76 } |
77 void dump(Ostream &Str) const { | 77 void dump(Ostream &Str) const { |
78 if (BuildDefs::dump()) | 78 if (BuildDefs::dump()) |
79 dump(nullptr, Str); | 79 dump(nullptr, Str); |
80 } | 80 } |
81 | 81 |
82 protected: | 82 protected: |
83 Operand(OperandKind Kind, Type Ty) : Ty(Ty), Kind(Kind) {} | 83 Operand(OperandKind Kind, Type Ty) : Ty(Ty), Kind(Kind) {} |
| 84 virtual ~Operand() = default; |
84 | 85 |
85 const Type Ty; | 86 const Type Ty; |
86 const OperandKind Kind; | 87 const OperandKind Kind; |
87 // Vars and NumVars are initialized by the derived class. | 88 // Vars and NumVars are initialized by the derived class. |
88 SizeT NumVars = 0; | 89 SizeT NumVars = 0; |
89 Variable **Vars = nullptr; | 90 Variable **Vars = nullptr; |
90 }; | 91 }; |
91 | 92 |
92 template <class StreamType> | 93 template <class StreamType> |
93 inline StreamType &operator<<(StreamType &Str, const Operand &Op) { | 94 inline StreamType &operator<<(StreamType &Str, const Operand &Op) { |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 private: | 644 private: |
644 const Cfg *Func; | 645 const Cfg *Func; |
645 MetadataKind Kind; | 646 MetadataKind Kind; |
646 std::vector<VariableTracking> Metadata; | 647 std::vector<VariableTracking> Metadata; |
647 const static InstDefList NoDefinitions; | 648 const static InstDefList NoDefinitions; |
648 }; | 649 }; |
649 | 650 |
650 } // end of namespace Ice | 651 } // end of namespace Ice |
651 | 652 |
652 #endif // SUBZERO_SRC_ICEOPERAND_H | 653 #endif // SUBZERO_SRC_ICEOPERAND_H |
OLD | NEW |