OLD | NEW |
1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// | 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 various useful types and classes that have | 10 // This file declares various useful types and classes that have |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 namespace Ice { | 44 namespace Ice { |
45 | 45 |
46 class Cfg; | 46 class Cfg; |
47 class CfgNode; | 47 class CfgNode; |
48 class Constant; | 48 class Constant; |
49 class GlobalContext; | 49 class GlobalContext; |
50 class Inst; | 50 class Inst; |
51 class InstPhi; | 51 class InstPhi; |
52 class InstTarget; | 52 class InstTarget; |
| 53 class LiveRange; |
| 54 class Liveness; |
53 class Operand; | 55 class Operand; |
54 class TargetLowering; | 56 class TargetLowering; |
55 class Variable; | 57 class Variable; |
56 | 58 |
57 // TODO: Switch over to LLVM's ADT container classes. | 59 // TODO: Switch over to LLVM's ADT container classes. |
58 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-
for-a-task | 60 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-
for-a-task |
59 typedef std::string IceString; | 61 typedef std::string IceString; |
60 typedef std::list<Inst *> InstList; | 62 typedef std::list<Inst *> InstList; |
61 typedef std::list<InstPhi *> PhiList; | 63 typedef std::list<InstPhi *> PhiList; |
62 typedef std::vector<Variable *> VarList; | 64 typedef std::vector<Variable *> VarList; |
63 typedef std::vector<CfgNode *> NodeList; | 65 typedef std::vector<CfgNode *> NodeList; |
64 typedef std::vector<Constant *> ConstantList; | 66 typedef std::vector<Constant *> ConstantList; |
65 | 67 |
66 // SizeT is for holding small-ish limits like number of source | 68 // SizeT is for holding small-ish limits like number of source |
67 // operands in an instruction. It is used instead of size_t (which | 69 // operands in an instruction. It is used instead of size_t (which |
68 // may be 64-bits wide) when we want to save space. | 70 // may be 64-bits wide) when we want to save space. |
69 typedef uint32_t SizeT; | 71 typedef uint32_t SizeT; |
70 | 72 |
| 73 enum LivenessMode { |
| 74 // Basic version of live-range-end calculation. Marks the last uses |
| 75 // of variables based on dataflow analysis. Records the set of |
| 76 // live-in and live-out variables for each block. Identifies and |
| 77 // deletes dead instructions (primarily stores). |
| 78 Liveness_Basic, |
| 79 |
| 80 // In addition to Liveness_Basic, also calculate the complete |
| 81 // live range for each variable in a form suitable for interference |
| 82 // calculation and register allocation. |
| 83 Liveness_Intervals |
| 84 }; |
| 85 |
71 enum VerboseItem { | 86 enum VerboseItem { |
72 IceV_None = 0, | 87 IceV_None = 0, |
73 IceV_Instructions = 1 << 0, | 88 IceV_Instructions = 1 << 0, |
74 IceV_Deleted = 1 << 1, | 89 IceV_Deleted = 1 << 1, |
75 IceV_InstNumbers = 1 << 2, | 90 IceV_InstNumbers = 1 << 2, |
76 IceV_Preds = 1 << 3, | 91 IceV_Preds = 1 << 3, |
77 IceV_Succs = 1 << 4, | 92 IceV_Succs = 1 << 4, |
78 IceV_Liveness = 1 << 5, | 93 IceV_Liveness = 1 << 5, |
79 IceV_RegManager = 1 << 6, | 94 IceV_RegManager = 1 << 6, |
80 IceV_RegOrigins = 1 << 7, | 95 IceV_RegOrigins = 1 << 7, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 136 |
122 private: | 137 private: |
123 const llvm::TimeRecord Start; | 138 const llvm::TimeRecord Start; |
124 Timer(const Timer &) LLVM_DELETED_FUNCTION; | 139 Timer(const Timer &) LLVM_DELETED_FUNCTION; |
125 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; | 140 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; |
126 }; | 141 }; |
127 | 142 |
128 } // end of namespace Ice | 143 } // end of namespace Ice |
129 | 144 |
130 #endif // SUBZERO_SRC_ICEDEFS_H | 145 #endif // SUBZERO_SRC_ICEDEFS_H |
OLD | NEW |