summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAlloc/IGNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/IGNode.h')
-rw-r--r--llvm/lib/CodeGen/RegAlloc/IGNode.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/IGNode.h b/llvm/lib/CodeGen/RegAlloc/IGNode.h
index bdaedf8c134..177800c5bb9 100644
--- a/llvm/lib/CodeGen/RegAlloc/IGNode.h
+++ b/llvm/lib/CodeGen/RegAlloc/IGNode.h
@@ -37,11 +37,9 @@ class RegClass;
//----------------------------------------------------------------------------
class IGNode {
- const int Index; // index within IGNodeList
-
- bool OnStack; // this has been pushed on to stack for coloring
-
- std::vector<IGNode *> AdjList; // adjacency list for this live range
+ const unsigned Index; // index within IGNodeList
+ bool OnStack; // this has been pushed on to stack for coloring
+ std::vector<IGNode *> AdjList;// adjacency list for this live range
int CurDegree;
//
@@ -50,12 +48,14 @@ class IGNode {
// Decremented when a neighbor is pushed on to the stack.
// After that, never incremented/set again nor used.
- LiveRange *const ParentLR; // parent LR (cannot be a const)
+ LiveRange *const ParentLR;
public:
- // constructor
- //
- IGNode(LiveRange *LR, unsigned index);
+ IGNode(LiveRange *LR, unsigned index) : Index(index), ParentLR(LR) {
+ OnStack = false;
+ CurDegree = -1;
+ ParentLR->setUserIGNode(this);
+ }
inline unsigned int getIndex() const { return Index; }
OpenPOWER on IntegriCloud