summaryrefslogtreecommitdiff
path: root/lib/CodeGen/Spiller.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-11-19 04:15:33 +0000
committerLang Hames <lhames@gmail.com>2009-11-19 04:15:33 +0000
commit835ca07991c1b8ec47240b15417e1b2732480094 (patch)
tree798d9727b01e463498f682b5987b1aee13f3fea9 /lib/CodeGen/Spiller.h
parent2b5e6b1c9c9c3c3f0d07098020f9eb4527515374 (diff)
downloadllvm-835ca07991c1b8ec47240b15417e1b2732480094.tar.gz
llvm-835ca07991c1b8ec47240b15417e1b2732480094.tar.bz2
llvm-835ca07991c1b8ec47240b15417e1b2732480094.tar.xz
Added a new Spiller implementation which wraps LiveIntervals::addIntervalsForSpills.
All spiller calls in RegAllocLinearScan now go through the new Spiller interface. The "-new-spill-framework" command line option has been removed. To use the trivial in-place spiller you should now pass "-spiller=trivial -rewriter=trivial". (Note the trivial spiller/rewriter are only meant to serve as examples of the new in-place modification work. Enabling them will yield terrible, though hopefully functional, code). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Spiller.h')
-rw-r--r--lib/CodeGen/Spiller.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/Spiller.h b/lib/CodeGen/Spiller.h
index 8abf9b517c..7ec8e6d7ff 100644
--- a/lib/CodeGen/Spiller.h
+++ b/lib/CodeGen/Spiller.h
@@ -10,6 +10,7 @@
#ifndef LLVM_CODEGEN_SPILLER_H
#define LLVM_CODEGEN_SPILLER_H
+#include "llvm/ADT/SmallVector.h"
#include <vector>
namespace llvm {
@@ -19,6 +20,7 @@ namespace llvm {
class LiveStacks;
class MachineFunction;
class MachineInstr;
+ class MachineLoopInfo;
class VirtRegMap;
class VNInfo;
@@ -32,13 +34,15 @@ namespace llvm {
/// Spill the given live range. The method used will depend on the Spiller
/// implementation selected.
- virtual std::vector<LiveInterval*> spill(LiveInterval *li) = 0;
+ virtual std::vector<LiveInterval*> spill(LiveInterval *li,
+ SmallVectorImpl<LiveInterval*> &spillIs) = 0;
};
/// Create and return a spiller object, as specified on the command line.
Spiller* createSpiller(MachineFunction *mf, LiveIntervals *li,
- LiveStacks *ls, VirtRegMap *vrm);
+ LiveStacks *ls, const MachineLoopInfo *loopInfo,
+ VirtRegMap *vrm);
}
#endif