| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (!ALLOW_DUMP) | 68 if (!ALLOW_DUMP) |
| 69 return; | 69 return; |
| 70 assert(Func); | 70 assert(Func); |
| 71 dump(Func, Func->getContext()->getStrDump()); | 71 dump(Func, Func->getContext()->getStrDump()); |
| 72 } | 72 } |
| 73 void dump(Ostream &Str) const { | 73 void dump(Ostream &Str) const { |
| 74 if (ALLOW_DUMP) | 74 if (ALLOW_DUMP) |
| 75 dump(nullptr, Str); | 75 dump(nullptr, Str); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Query whether this object was allocated in isolation, or added to | |
| 79 // some higher-level pool. This determines whether a containing | |
| 80 // object's destructor should delete this object. Generally, | |
| 81 // constants are pooled globally, variables are pooled per-CFG, and | |
| 82 // target-specific operands are not pooled. | |
| 83 virtual bool isPooled() const { return false; } | |
| 84 | |
| 85 virtual ~Operand() {} | 78 virtual ~Operand() {} |
| 86 | 79 |
| 87 protected: | 80 protected: |
| 88 Operand(OperandKind Kind, Type Ty) | 81 Operand(OperandKind Kind, Type Ty) |
| 89 : Ty(Ty), Kind(Kind), NumVars(0), Vars(nullptr) {} | 82 : Ty(Ty), Kind(Kind), NumVars(0), Vars(nullptr) {} |
| 90 | 83 |
| 91 const Type Ty; | 84 const Type Ty; |
| 92 const OperandKind Kind; | 85 const OperandKind Kind; |
| 93 // Vars and NumVars are initialized by the derived class. | 86 // Vars and NumVars are initialized by the derived class. |
| 94 SizeT NumVars; | 87 SizeT NumVars; |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 private: | 621 private: |
| 629 const Cfg *Func; | 622 const Cfg *Func; |
| 630 MetadataKind Kind; | 623 MetadataKind Kind; |
| 631 std::vector<VariableTracking> Metadata; | 624 std::vector<VariableTracking> Metadata; |
| 632 const static InstDefList NoDefinitions; | 625 const static InstDefList NoDefinitions; |
| 633 }; | 626 }; |
| 634 | 627 |
| 635 } // end of namespace Ice | 628 } // end of namespace Ice |
| 636 | 629 |
| 637 #endif // SUBZERO_SRC_ICEOPERAND_H | 630 #endif // SUBZERO_SRC_ICEOPERAND_H |
| OLD | NEW |