OLD | NEW |
1 //===- subzero/src/IceLiveness.h - Liveness analysis ------------*- C++ -*-===// | 1 //===- subzero/src/IceLiveness.h - Liveness analysis ------------*- 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 Liveness and LivenessNode classes, | 10 // This file declares the Liveness and LivenessNode classes, |
11 // which are used for liveness analysis. The node-specific | 11 // which are used for liveness analysis. The node-specific |
12 // information tracked for each Variable includes whether it is | 12 // information tracked for each Variable includes whether it is |
13 // live on entry, whether it is live on exit, the instruction number | 13 // live on entry, whether it is live on exit, the instruction number |
14 // that starts its live range, and the instruction number that ends | 14 // that starts its live range, and the instruction number that ends |
15 // its live range. At the Cfg level, the actual live intervals are | 15 // its live range. At the Cfg level, the actual live intervals are |
16 // recorded. | 16 // recorded. |
17 // | 17 // |
18 //===----------------------------------------------------------------------===// | 18 //===----------------------------------------------------------------------===// |
19 | 19 |
20 #ifndef SUBZERO_SRC_ICELIVENESS_H | 20 #ifndef SUBZERO_SRC_ICELIVENESS_H |
21 #define SUBZERO_SRC_ICELIVENESS_H | 21 #define SUBZERO_SRC_ICELIVENESS_H |
22 | 22 |
23 #include "IceDefs.h" | 23 #include "IceDefs.h" |
24 #include "IceTypes.h" | 24 #include "IceTypes.h" |
25 | 25 |
26 namespace Ice { | 26 namespace Ice { |
27 | 27 |
28 class Liveness { | 28 class Liveness { |
| 29 Liveness() = delete; |
29 Liveness(const Liveness &) = delete; | 30 Liveness(const Liveness &) = delete; |
30 Liveness &operator=(const Liveness &) = delete; | 31 Liveness &operator=(const Liveness &) = delete; |
31 | 32 |
32 class LivenessNode { | 33 class LivenessNode { |
33 LivenessNode &operator=(const LivenessNode &) = delete; | 34 LivenessNode &operator=(const LivenessNode &) = delete; |
34 | 35 |
35 public: | 36 public: |
36 LivenessNode() : NumLocals(0), NumNonDeadPhis(0) {} | 37 LivenessNode() : NumLocals(0), NumNonDeadPhis(0) {} |
37 LivenessNode(const LivenessNode &) = default; | 38 LivenessNode(const LivenessNode &) = default; |
38 // NumLocals is the number of Variables local to this block. | 39 // NumLocals is the number of Variables local to this block. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // within its basic block. | 109 // within its basic block. |
109 std::vector<SizeT> VarToLiveMap; | 110 std::vector<SizeT> VarToLiveMap; |
110 // LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for | 111 // LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for |
111 // non-local variables. | 112 // non-local variables. |
112 std::vector<Variable *> LiveToVarMap; | 113 std::vector<Variable *> LiveToVarMap; |
113 }; | 114 }; |
114 | 115 |
115 } // end of namespace Ice | 116 } // end of namespace Ice |
116 | 117 |
117 #endif // SUBZERO_SRC_ICELIVENESS_H | 118 #endif // SUBZERO_SRC_ICELIVENESS_H |
OLD | NEW |