[llvm-commits] [llvm] r126005 - in /llvm/trunk/lib/CodeGen: RegAllocGreedy.cpp SplitKit.cpp SplitKit.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Feb 18 16:53:42 PST 2011


Author: stoklund
Date: Fri Feb 18 18:53:42 2011
New Revision: 126005

URL: http://llvm.org/viewvc/llvm-project?rev=126005&view=rev
Log:
Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().

Modified:
    llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
    llvm/trunk/lib/CodeGen/SplitKit.cpp
    llvm/trunk/lib/CodeGen/SplitKit.h

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=126005&r1=126004&r2=126005&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Fri Feb 18 18:53:42 2011
@@ -1266,7 +1266,7 @@
   Bundles = &getAnalysis<EdgeBundles>();
   SpillPlacer = &getAnalysis<SpillPlacement>();
 
-  SA.reset(new SplitAnalysis(*MF, *LIS, *Loops));
+  SA.reset(new SplitAnalysis(*VRM, *LIS, *Loops));
 
   allocatePhysRegs();
   addMBBLiveIns(MF);

Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=126005&r1=126004&r2=126005&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Fri Feb 18 18:53:42 2011
@@ -37,13 +37,14 @@
 //                                 Split Analysis
 //===----------------------------------------------------------------------===//
 
-SplitAnalysis::SplitAnalysis(const MachineFunction &mf,
+SplitAnalysis::SplitAnalysis(const VirtRegMap &vrm,
                              const LiveIntervals &lis,
                              const MachineLoopInfo &mli)
-  : MF(mf),
+  : MF(vrm.getMachineFunction()),
+    VRM(vrm),
     LIS(lis),
     Loops(mli),
-    TII(*mf.getTarget().getInstrInfo()),
+    TII(*MF.getTarget().getInstrInfo()),
     CurLI(0) {}
 
 void SplitAnalysis::clear() {

Modified: llvm/trunk/lib/CodeGen/SplitKit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.h?rev=126005&r1=126004&r2=126005&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.h (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.h Fri Feb 18 18:53:42 2011
@@ -43,6 +43,7 @@
 class SplitAnalysis {
 public:
   const MachineFunction &MF;
+  const VirtRegMap &VRM;
   const LiveIntervals &LIS;
   const MachineLoopInfo &Loops;
   const TargetInstrInfo &TII;
@@ -105,7 +106,7 @@
   bool canAnalyzeBranch(const MachineBasicBlock *MBB);
 
 public:
-  SplitAnalysis(const MachineFunction &mf, const LiveIntervals &lis,
+  SplitAnalysis(const VirtRegMap &vrm, const LiveIntervals &lis,
                 const MachineLoopInfo &mli);
 
   /// analyze - set CurLI to the specified interval, and analyze how it may be





More information about the llvm-commits mailing list