aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAlloc/IGNode.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-05 04:20:12 +0000
committerChris Lattner <sabre@nondot.org>2002-02-05 04:20:12 +0000
commit748697d2421051b3ff1263d13cccaf410f3e7034 (patch)
tree78b10a43c512846fce169c36f72c2a7a4c9bc43f /lib/CodeGen/RegAlloc/IGNode.h
parent3773094a1da7d7fc76a2491211fadf734c3b8645 (diff)
Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAlloc/IGNode.h')
-rw-r--r--lib/CodeGen/RegAlloc/IGNode.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/CodeGen/RegAlloc/IGNode.h b/lib/CodeGen/RegAlloc/IGNode.h
index bdaedf8c13..177800c5bb 100644
--- a/lib/CodeGen/RegAlloc/IGNode.h
+++ b/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; }