aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-06-12 23:52:58 +0000
committerNate Begeman <natebegeman@mac.com>2005-06-12 23:52:58 +0000
commit244e92eaab5065e489df98f3340f10815714185f (patch)
tree9157c0e797c5241a1de3525926eab3032d4c1271 /lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
parentac609ddf823d6d955f74ec6f82ca3b388ed9d610 (diff)
When compiled with GCC 4.0, a latent bug was exposed where both SparcV9
and the target independant register allocator were both using a class named 'LiveRange'. This lead to the target independant code calling code in the SparcV9 backend, which crashed. Fixed by renaming SparcV9's LiveRange to V9LiveRange. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp')
-rw-r--r--lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
index f54cbb09e8..19ffce1f71 100644
--- a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
+++ b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
@@ -74,7 +74,7 @@ void InterferenceGraph::createGraph()
//-----------------------------------------------------------------------------
// creates a new IGNode for the given live range and add to IG
//-----------------------------------------------------------------------------
-void InterferenceGraph::addLRToIG(LiveRange *const LR)
+void InterferenceGraph::addLRToIG(V9LiveRange *const LR)
{
IGNodeList.push_back(new IGNode(LR, IGNodeList.size()));
}
@@ -87,8 +87,8 @@ void InterferenceGraph::addLRToIG(LiveRange *const LR)
// are not updated. LR1 and LR2 must be distinct since if not, it suggests
// that there is some wrong logic in some other method.
//-----------------------------------------------------------------------------
-void InterferenceGraph::setInterference(const LiveRange *const LR1,
- const LiveRange *const LR2 ) {
+void InterferenceGraph::setInterference(const V9LiveRange *const LR1,
+ const V9LiveRange *const LR2 ) {
assert(LR1 != LR2);
IGNode *IGNode1 = LR1->getUserIGNode();
@@ -119,8 +119,9 @@ void InterferenceGraph::setInterference(const LiveRange *const LR1,
//----------------------------------------------------------------------------
// return whether two live ranges interfere
//----------------------------------------------------------------------------
-unsigned InterferenceGraph::getInterference(const LiveRange *const LR1,
- const LiveRange *const LR2) const {
+unsigned InterferenceGraph::getInterference(const V9LiveRange *const LR1,
+ const V9LiveRange *const LR2)
+ const {
assert(LR1 != LR2);
assertIGNode(this, LR1->getUserIGNode());
assertIGNode(this, LR2->getUserIGNode());
@@ -145,8 +146,8 @@ unsigned InterferenceGraph::getInterference(const LiveRange *const LR1,
// LiveRangeInfo::unionAndUpdateLRs for that purpose.
//----------------------------------------------------------------------------
-void InterferenceGraph::mergeIGNodesOfLRs(const LiveRange *LR1,
- LiveRange *LR2) {
+void InterferenceGraph::mergeIGNodesOfLRs(const V9LiveRange *LR1,
+ V9LiveRange *LR2) {
assert( LR1 != LR2); // cannot merge the same live range
@@ -168,7 +169,7 @@ void InterferenceGraph::mergeIGNodesOfLRs(const LiveRange *LR1,
for(unsigned i=0; i < SrcDegree; i++) {
IGNode *NeighNode = SrcNode->getAdjIGNode(i);
- LiveRange *const LROfNeigh = NeighNode->getParentLR();
+ V9LiveRange *const LROfNeigh = NeighNode->getParentLR();
// delete edge between src and neigh - even neigh == dest
NeighNode->delAdjIGNode(SrcNode);