| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void renumber(Cfg *Func); | 74 void renumber(Cfg *Func); |
| 75 enum { | 75 enum { |
| 76 NumberDeleted = -1, | 76 NumberDeleted = -1, |
| 77 NumberSentinel = 0, | 77 NumberSentinel = 0, |
| 78 NumberInitial = 2, | 78 NumberInitial = 2, |
| 79 NumberExtended = NumberInitial - 1 | 79 NumberExtended = NumberInitial - 1 |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 bool isDeleted() const { return Deleted; } | 82 bool isDeleted() const { return Deleted; } |
| 83 void setDeleted() { Deleted = true; } | 83 void setDeleted() { Deleted = true; } |
| 84 void setDead(bool Value = true) { Dead = Value; } |
| 84 void deleteIfDead(); | 85 void deleteIfDead(); |
| 85 | 86 |
| 86 bool hasSideEffects() const { return HasSideEffects; } | 87 bool hasSideEffects() const { return HasSideEffects; } |
| 87 | 88 |
| 88 bool isDestNonKillable() const { return IsDestNonKillable; } | 89 bool isDestNonKillable() const { return IsDestNonKillable; } |
| 89 void setDestNonKillable() { IsDestNonKillable = true; } | 90 void setDestNonKillable() { IsDestNonKillable = true; } |
| 90 | 91 |
| 91 Variable *getDest() const { return Dest; } | 92 Variable *getDest() const { return Dest; } |
| 92 | 93 |
| 93 SizeT getSrcSize() const { return NumSrcs; } | 94 SizeT getSrcSize() const { return NumSrcs; } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void resetLastUses() { LiveRangesEnded = 0; } | 172 void resetLastUses() { LiveRangesEnded = 0; } |
| 172 // The destroy() method lets the instruction cleanly release any | 173 // The destroy() method lets the instruction cleanly release any |
| 173 // memory that was allocated via the Cfg's allocator. | 174 // memory that was allocated via the Cfg's allocator. |
| 174 virtual void destroy(Cfg *Func) { Func->deallocateArrayOf<Operand *>(Srcs); } | 175 virtual void destroy(Cfg *Func) { Func->deallocateArrayOf<Operand *>(Srcs); } |
| 175 | 176 |
| 176 const InstKind Kind; | 177 const InstKind Kind; |
| 177 // Number is the instruction number for describing live ranges. | 178 // Number is the instruction number for describing live ranges. |
| 178 InstNumberT Number; | 179 InstNumberT Number; |
| 179 // Deleted means irrevocably deleted. | 180 // Deleted means irrevocably deleted. |
| 180 bool Deleted; | 181 bool Deleted; |
| 181 // Dead means pending deletion after liveness analysis converges. | 182 // Dead means one of two things depending on context: (1) pending |
| 183 // deletion after liveness analysis converges, or (2) marked for |
| 184 // deletion during lowering due to a folded bool operation. |
| 182 bool Dead; | 185 bool Dead; |
| 183 // HasSideEffects means the instruction is something like a function | 186 // HasSideEffects means the instruction is something like a function |
| 184 // call or a volatile load that can't be removed even if its Dest | 187 // call or a volatile load that can't be removed even if its Dest |
| 185 // variable is not live. | 188 // variable is not live. |
| 186 bool HasSideEffects; | 189 bool HasSideEffects; |
| 187 // IsDestNonKillable means that liveness analysis shouldn't consider | 190 // IsDestNonKillable means that liveness analysis shouldn't consider |
| 188 // this instruction to kill the Dest variable. This is used when | 191 // this instruction to kill the Dest variable. This is used when |
| 189 // lowering produces two assignments to the same variable. | 192 // lowering produces two assignments to the same variable. |
| 190 bool IsDestNonKillable; | 193 bool IsDestNonKillable; |
| 191 | 194 |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 943 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
| 941 void deleteNode(Ice::Inst *) {} | 944 void deleteNode(Ice::Inst *) {} |
| 942 | 945 |
| 943 private: | 946 private: |
| 944 mutable ilist_half_node<Ice::Inst> Sentinel; | 947 mutable ilist_half_node<Ice::Inst> Sentinel; |
| 945 }; | 948 }; |
| 946 | 949 |
| 947 } // end of namespace llvm | 950 } // end of namespace llvm |
| 948 | 951 |
| 949 #endif // SUBZERO_SRC_ICEINST_H | 952 #endif // SUBZERO_SRC_ICEINST_H |
| OLD | NEW |