Force the greedy register allocator to always use the inline spiller.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 10 Dec 2010 22:54:44 +0000 (22:54 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 10 Dec 2010 22:54:44 +0000 (22:54 +0000)
Soon, RegAllocGreedy will start splitting live ranges, and then deferred
spilling won't work anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121591 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocGreedy.cpp
lib/CodeGen/Spiller.cpp
lib/CodeGen/Spiller.h

index df816f6539562a2e8444d8d29e05e1834affa273..b527b9fe4eb8fbb15458c473104f2ea40153f073 100644 (file)
@@ -311,7 +311,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
                      getAnalysis<LiveIntervals>());
 
   ReservedRegs = TRI->getReservedRegs(*MF);
-  SpillerInstance.reset(createSpiller(*this, *MF, *VRM));
+  SpillerInstance.reset(createInlineSpiller(*this, *MF, *VRM));
   allocatePhysRegs();
   addMBBLiveIns(MF);
 
index 3167eeb9412990834a9700d7b89fdf48e7669878..c7df369583c25a4d66a709aeab69900b974fd850 100644 (file)
@@ -231,12 +231,6 @@ public:
 
 } // end anonymous namespace
 
-namespace llvm {
-Spiller *createInlineSpiller(MachineFunctionPass &pass,
-                             MachineFunction &mf,
-                             VirtRegMap &vrm);
-}
-
 llvm::Spiller* llvm::createSpiller(MachineFunctionPass &pass,
                                    MachineFunction &mf,
                                    VirtRegMap &vrm) {
index 92f092a0da58760673b0cb2676ef79157f6cdab4..f017583494ed28f2c621fdbbbdf180d5702c003b 100644 (file)
@@ -44,6 +44,13 @@ namespace llvm {
   Spiller* createSpiller(MachineFunctionPass &pass,
                          MachineFunction &mf,
                          VirtRegMap &vrm);
+
+  /// Create and return a spiller that will insert spill code directly instead
+  /// of deferring though VirtRegMap.
+  Spiller *createInlineSpiller(MachineFunctionPass &pass,
+                               MachineFunction &mf,
+                               VirtRegMap &vrm);
+
 }
 
 #endif