| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // instruction, which is the last instruction of the block. | 85 // instruction, which is the last instruction of the block. |
| 86 virtual NodeList getTerminatorEdges() const { | 86 virtual NodeList getTerminatorEdges() const { |
| 87 // All valid terminator instructions override this method. For | 87 // All valid terminator instructions override this method. For |
| 88 // the default implementation, we assert in case some CfgNode | 88 // the default implementation, we assert in case some CfgNode |
| 89 // is constructed without a terminator instruction at the end. | 89 // is constructed without a terminator instruction at the end. |
| 90 llvm_unreachable( | 90 llvm_unreachable( |
| 91 "getTerminatorEdges() called on a non-terminator instruction"); | 91 "getTerminatorEdges() called on a non-terminator instruction"); |
| 92 return NodeList(); | 92 return NodeList(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 virtual bool isSimpleAssign() const { return false; } |
| 96 |
| 95 void livenessLightweight(Cfg *Func, llvm::BitVector &Live); | 97 void livenessLightweight(Cfg *Func, llvm::BitVector &Live); |
| 96 void liveness(InstNumberT InstNumber, llvm::BitVector &Live, | 98 void liveness(InstNumberT InstNumber, llvm::BitVector &Live, |
| 97 Liveness *Liveness, const CfgNode *Node); | 99 Liveness *Liveness, const CfgNode *Node); |
| 98 | 100 |
| 99 // Get the number of native instructions that this instruction | 101 // Get the number of native instructions that this instruction |
| 100 // ultimately emits. By default, high-level instructions don't | 102 // ultimately emits. By default, high-level instructions don't |
| 101 // result in any native instructions, and a target-specific | 103 // result in any native instructions, and a target-specific |
| 102 // instruction results in a single native instruction. | 104 // instruction results in a single native instruction. |
| 103 virtual uint32_t getEmitInstCount() const { return 0; } | 105 virtual uint32_t getEmitInstCount() const { return 0; } |
| 104 virtual void emit(const Cfg *Func) const; | 106 virtual void emit(const Cfg *Func) const; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // abstraction for some of the lowering. E.g., if Phi instruction | 228 // abstraction for some of the lowering. E.g., if Phi instruction |
| 227 // lowering happens before target lowering, or for representing an | 229 // lowering happens before target lowering, or for representing an |
| 228 // Inttoptr instruction, or as an intermediate step for lowering a | 230 // Inttoptr instruction, or as an intermediate step for lowering a |
| 229 // Load instruction. | 231 // Load instruction. |
| 230 class InstAssign : public Inst { | 232 class InstAssign : public Inst { |
| 231 public: | 233 public: |
| 232 static InstAssign *create(Cfg *Func, Variable *Dest, Operand *Source) { | 234 static InstAssign *create(Cfg *Func, Variable *Dest, Operand *Source) { |
| 233 return new (Func->allocateInst<InstAssign>()) | 235 return new (Func->allocateInst<InstAssign>()) |
| 234 InstAssign(Func, Dest, Source); | 236 InstAssign(Func, Dest, Source); |
| 235 } | 237 } |
| 238 virtual bool isSimpleAssign() const { return true; } |
| 236 virtual void dump(const Cfg *Func) const; | 239 virtual void dump(const Cfg *Func) const; |
| 237 static bool classof(const Inst *Inst) { return Inst->getKind() == Assign; } | 240 static bool classof(const Inst *Inst) { return Inst->getKind() == Assign; } |
| 238 | 241 |
| 239 private: | 242 private: |
| 240 InstAssign(Cfg *Func, Variable *Dest, Operand *Source); | 243 InstAssign(Cfg *Func, Variable *Dest, Operand *Source); |
| 241 InstAssign(const InstAssign &) LLVM_DELETED_FUNCTION; | 244 InstAssign(const InstAssign &) LLVM_DELETED_FUNCTION; |
| 242 InstAssign &operator=(const InstAssign &) LLVM_DELETED_FUNCTION; | 245 InstAssign &operator=(const InstAssign &) LLVM_DELETED_FUNCTION; |
| 243 virtual ~InstAssign() {} | 246 virtual ~InstAssign() {} |
| 244 }; | 247 }; |
| 245 | 248 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 assert(Kind >= Target); | 764 assert(Kind >= Target); |
| 762 } | 765 } |
| 763 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION; | 766 InstTarget(const InstTarget &) LLVM_DELETED_FUNCTION; |
| 764 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION; | 767 InstTarget &operator=(const InstTarget &) LLVM_DELETED_FUNCTION; |
| 765 virtual ~InstTarget() {} | 768 virtual ~InstTarget() {} |
| 766 }; | 769 }; |
| 767 | 770 |
| 768 } // end of namespace Ice | 771 } // end of namespace Ice |
| 769 | 772 |
| 770 #endif // SUBZERO_SRC_ICEINST_H | 773 #endif // SUBZERO_SRC_ICEINST_H |
| OLD | NEW |