summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAlloc/IGNode.h
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
commit5cc5d4b19addf72f017e3f335942d09cc743f5de (patch)
tree73ff5fd8985789929ba768a2ed26c199421eb8ff /llvm/lib/CodeGen/RegAlloc/IGNode.h
parente6ee32bfe2064fe3ee2de9d996a6c082abbdc13d (diff)
downloadbcm5719-llvm-5cc5d4b19addf72f017e3f335942d09cc743f5de.tar.gz
bcm5719-llvm-5cc5d4b19addf72f017e3f335942d09cc743f5de.zip
Add method IGNode::getCombinedDegree to count the sum of the degrees
of two nodes, excluding duplicates. llvm-svn: 3848
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/IGNode.h')
-rw-r--r--llvm/lib/CodeGen/RegAlloc/IGNode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/IGNode.h b/llvm/lib/CodeGen/RegAlloc/IGNode.h
index bcf850f68b3..edb178f5bc9 100644
--- a/llvm/lib/CodeGen/RegAlloc/IGNode.h
+++ b/llvm/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)
OpenPOWER on IntegriCloud