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 /// \file | 10 /// \file |
11 /// \brief Declares the Liveness and LivenessNode classes, which are used for | 11 /// \brief Declares the Liveness and LivenessNode classes, which are used for |
12 /// liveness analysis. | 12 /// liveness analysis. |
13 /// | 13 /// |
14 /// The node-specific information tracked for each Variable includes whether it | 14 /// The node-specific information tracked for each Variable includes whether it |
15 /// is live on entry, whether it is live on exit, the instruction number that | 15 /// is live on entry, whether it is live on exit, the instruction number that |
16 /// starts its live range, and the instruction number that ends its live range. | 16 /// starts its live range, and the instruction number that ends its live range. |
17 /// At the Cfg level, the actual live intervals are recorded. | 17 /// At the Cfg level, the actual live intervals are recorded. |
18 /// | 18 /// |
19 //===----------------------------------------------------------------------===// | 19 //===----------------------------------------------------------------------===// |
20 | 20 |
21 #ifndef SUBZERO_SRC_ICELIVENESS_H | 21 #ifndef SUBZERO_SRC_ICELIVENESS_H |
22 #define SUBZERO_SRC_ICELIVENESS_H | 22 #define SUBZERO_SRC_ICELIVENESS_H |
23 | 23 |
| 24 #include "IceDefs.h" |
| 25 #include "IceBitVector.h" |
24 #include "IceCfgNode.h" | 26 #include "IceCfgNode.h" |
25 #include "IceDefs.h" | |
26 #include "IceTypes.h" | 27 #include "IceTypes.h" |
27 | 28 |
28 namespace Ice { | 29 namespace Ice { |
29 | 30 |
30 class Liveness { | 31 class Liveness { |
31 Liveness() = delete; | 32 Liveness() = delete; |
32 Liveness(const Liveness &) = delete; | 33 Liveness(const Liveness &) = delete; |
33 Liveness &operator=(const Liveness &) = delete; | 34 Liveness &operator=(const Liveness &) = delete; |
34 | 35 |
35 class LivenessNode { | 36 class LivenessNode { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 /// Size of Nodes is Cfg::Nodes.size(). | 111 /// Size of Nodes is Cfg::Nodes.size(). |
111 CfgVector<LivenessNode> Nodes; | 112 CfgVector<LivenessNode> Nodes; |
112 /// VarToLiveMap maps a Variable's Variable::Number to its live index within | 113 /// VarToLiveMap maps a Variable's Variable::Number to its live index within |
113 /// its basic block. | 114 /// its basic block. |
114 CfgVector<SizeT> VarToLiveMap; | 115 CfgVector<SizeT> VarToLiveMap; |
115 /// LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for non-local | 116 /// LiveToVarMap is analogous to LivenessNode::LiveToVarMap, but for non-local |
116 /// variables. | 117 /// variables. |
117 CfgVector<Variable *> LiveToVarMap; | 118 CfgVector<Variable *> LiveToVarMap; |
118 /// RangeMask[Variable::Number] indicates whether we want to track that | 119 /// RangeMask[Variable::Number] indicates whether we want to track that |
119 /// Variable's live range. | 120 /// Variable's live range. |
120 llvm::BitVector RangeMask; | 121 LivenessBV RangeMask; |
121 }; | 122 }; |
122 | 123 |
123 } // end of namespace Ice | 124 } // end of namespace Ice |
124 | 125 |
125 #endif // SUBZERO_SRC_ICELIVENESS_H | 126 #endif // SUBZERO_SRC_ICELIVENESS_H |
OLD | NEW |