From 0efb50761dfb9b925888f94d7eadaad12249c1f6 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Fri, 20 Sep 2002 00:55:04 +0000 Subject: [PATCH] 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 --- lib/CodeGen/RegAlloc/IGNode.h | 3 +++ lib/Target/SparcV9/RegAlloc/IGNode.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/CodeGen/RegAlloc/IGNode.h b/lib/CodeGen/RegAlloc/IGNode.h index bcf850f68b3..edb178f5bc9 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 bcf850f68b3..edb178f5bc9 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)