From 4d7fc119b8e717f221a4efaac79214b2d20d2ed1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 4 Feb 2002 20:02:38 +0000 Subject: [PATCH] * RegisterAllocation _uses_ LiveVar analysis, instead of creating it's own copy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1701 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 6 ++---- lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 1ce41fda430..2fd2c91a6fd 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -48,10 +48,7 @@ namespace { cerr << "\n******************** Method "<< M->getName() << " ********************\n"; - MethodLiveVarInfo LVI(M); // Analyze live varaibles - LVI.analyze(); - - PhyRegAlloc PRA(M, Target, &LVI, + PhyRegAlloc PRA(M, Target, &getAnalysis(), &getAnalysis()); PRA.allocateRegisters(); @@ -63,6 +60,7 @@ namespace { Pass::AnalysisSet &Destroyed, Pass::AnalysisSet &Provided) { Requires.push_back(cfg::LoopInfo::ID); + Requires.push_back(MethodLiveVarInfo::ID); } }; } diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 1ce41fda430..2fd2c91a6fd 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -48,10 +48,7 @@ namespace { cerr << "\n******************** Method "<< M->getName() << " ********************\n"; - MethodLiveVarInfo LVI(M); // Analyze live varaibles - LVI.analyze(); - - PhyRegAlloc PRA(M, Target, &LVI, + PhyRegAlloc PRA(M, Target, &getAnalysis(), &getAnalysis()); PRA.allocateRegisters(); @@ -63,6 +60,7 @@ namespace { Pass::AnalysisSet &Destroyed, Pass::AnalysisSet &Provided) { Requires.push_back(cfg::LoopInfo::ID); + Requires.push_back(MethodLiveVarInfo::ID); } }; } -- 2.34.1