* RegisterAllocation _uses_ LiveVar analysis, instead of creating it's own copy
authorChris Lattner <sabre@nondot.org>
Mon, 4 Feb 2002 20:02:38 +0000 (20:02 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 4 Feb 2002 20:02:38 +0000 (20:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1701 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index 1ce41fda430b0f9fd4d7aa9d2e40f743f526900b..2fd2c91a6fd6b5e382ffd45704b34b42a4b72f71 100644 (file)
@@ -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);
     }
   };
 }
index 1ce41fda430b0f9fd4d7aa9d2e40f743f526900b..2fd2c91a6fd6b5e382ffd45704b34b42a4b72f71 100644 (file)
@@ -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);
     }
   };
 }