diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-04 20:02:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-04 20:02:38 +0000 |
commit | 4d7fc119b8e717f221a4efaac79214b2d20d2ed1 (patch) | |
tree | 3953b8d6d935d133d73d3c53dae2f4cffc0bab48 | |
parent | 9adb7ad457b38de13dd16b86a90f645695dae5a0 (diff) |
* 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
-rw-r--r-- | lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 6 | ||||
-rw-r--r-- | 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 1ce41fda43..2fd2c91a6f 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<MethodLiveVarInfo>(), &getAnalysis<cfg::LoopInfo>()); 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 1ce41fda43..2fd2c91a6f 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<MethodLiveVarInfo>(), &getAnalysis<cfg::LoopInfo>()); PRA.allocateRegisters(); @@ -63,6 +60,7 @@ namespace { Pass::AnalysisSet &Destroyed, Pass::AnalysisSet &Provided) { Requires.push_back(cfg::LoopInfo::ID); + Requires.push_back(MethodLiveVarInfo::ID); } }; } |