summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-09-20 00:55:04 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-09-20 00:55:04 +0000
commit0efb50761dfb9b925888f94d7eadaad12249c1f6 (patch)
tree952315e53f041c92dba92c3c74463ad23d4aef51
parent57e14bd75735b79b189d85f25c5b86983845ff15 (diff)
downloadexternal_llvm-0efb50761dfb9b925888f94d7eadaad12249c1f6.zip
external_llvm-0efb50761dfb9b925888f94d7eadaad12249c1f6.tar.gz
external_llvm-0efb50761dfb9b925888f94d7eadaad12249c1f6.tar.bz2
Add method IGNode::getCombinedDegree to count the sum of the degrees
of two nodes, excluding duplicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3848 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAlloc/IGNode.h3
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAlloc/IGNode.h b/lib/CodeGen/RegAlloc/IGNode.h
index bcf850f..edb178f 100644
--- a/lib/CodeGen/RegAlloc/IGNode.h
+++ b/lib/CodeGen/RegAlloc/IGNode.h
@@ -72,6 +72,9 @@ public:
inline unsigned getNumOfNeighbors() const { return AdjList.size(); }
+ // Get the number of unique neighbors if these two nodes are merged
+ unsigned getCombinedDegree(const IGNode* otherNode) const;
+
inline bool isOnStack() const { return OnStack; }
// remove form IG and pushes on to stack (reduce the degree of neighbors)
diff --git a/lib/Target/SparcV9/RegAlloc/IGNode.h b/lib/Target/SparcV9/RegAlloc/IGNode.h
index bcf850f..edb178f 100644
--- a/lib/Target/SparcV9/RegAlloc/IGNode.h
+++ b/lib/Target/SparcV9/RegAlloc/IGNode.h
@@ -72,6 +72,9 @@ public:
inline unsigned getNumOfNeighbors() const { return AdjList.size(); }
+ // Get the number of unique neighbors if these two nodes are merged
+ unsigned getCombinedDegree(const IGNode* otherNode) const;
+
inline bool isOnStack() const { return OnStack; }
// remove form IG and pushes on to stack (reduce the degree of neighbors)