summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAlloc/RegClass.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/RegClass.h')
-rw-r--r--llvm/lib/CodeGen/RegAlloc/RegClass.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/RegClass.h b/llvm/lib/CodeGen/RegAlloc/RegClass.h
index c93d6961e0b..4584a5f7a1e 100644
--- a/llvm/lib/CodeGen/RegAlloc/RegClass.h
+++ b/llvm/lib/CodeGen/RegAlloc/RegClass.h
@@ -42,16 +42,17 @@ class RegClass {
// buildInterferenceGraph
std::stack<IGNode *> IGNodeStack; // the stack used for coloring
- const ReservedColorListType *const ReservedColorList;
+ // ReservedColorList - for passing registers that are pre-allocated and cannot
+ // be used by the register allocator for this function.
//
- // for passing registers that are pre-allocated and cannot be used by the
- // register allocator for this function.
+ const ReservedColorListType *const ReservedColorList;
- bool *IsColorUsedArr;
+ // IsColorUsedArr - An array used for coloring each node. This array must be
+ // of size MRC->getNumOfAllRegs(). Allocated once in the constructor for
+ // efficiency.
//
- // An array used for coloring each node. This array must be of size
- // MRC->getNumOfAllRegs(). Allocated once in the constructor
- // for efficiency.
+ std::vector<bool> IsColorUsedArr;
+
//--------------------------- private methods ------------------------------
@@ -71,8 +72,6 @@ class RegClass {
const MachineRegClassInfo *MRC,
const ReservedColorListType *RCL = 0);
- ~RegClass() { delete[] IsColorUsedArr; }
-
inline void createInterferenceGraph() { IG.createGraph(); }
inline InterferenceGraph &getIG() { return IG; }
@@ -106,7 +105,7 @@ class RegClass {
{ IG.mergeIGNodesOfLRs(LR1, LR2); }
- inline bool * getIsColorUsedArr() { return IsColorUsedArr; }
+ inline std::vector<bool> &getIsColorUsedArr() { return IsColorUsedArr; }
inline void printIGNodeList() const {
OpenPOWER on IntegriCloud