Skip to content

Commit 7ef502f

Browse files
committed
Delete the 'standard' spiller with used the old spilling framework.
The current register allocators all use the inline spiller. llvm-svn: 144477
1 parent 11bb63a commit 7ef502f

File tree

2 files changed

+3
-46
lines changed

2 files changed

+3
-46
lines changed

llvm/lib/CodeGen/Spiller.cpp

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929
using namespace llvm;
3030

3131
namespace {
32-
enum SpillerName { trivial, standard, inline_ };
32+
enum SpillerName { trivial, inline_ };
3333
}
3434

3535
static cl::opt<SpillerName>
3636
spillerOpt("spiller",
3737
cl::desc("Spiller to use: (default: standard)"),
3838
cl::Prefix,
3939
cl::values(clEnumVal(trivial, "trivial spiller"),
40-
clEnumVal(standard, "default spiller"),
4140
clEnumValN(inline_, "inline", "inline spiller"),
4241
clEnumValEnd),
43-
cl::init(standard));
42+
cl::init(trivial));
4443

4544
// Spiller virtual destructor implementation.
4645
Spiller::~Spiller() {}
@@ -188,54 +187,12 @@ class TrivialSpiller : public SpillerBase {
188187

189188
} // end anonymous namespace
190189

191-
namespace {
192-
193-
/// Falls back on LiveIntervals::addIntervalsForSpills.
194-
class StandardSpiller : public Spiller {
195-
protected:
196-
MachineFunction *mf;
197-
LiveIntervals *lis;
198-
LiveStacks *lss;
199-
MachineLoopInfo *loopInfo;
200-
VirtRegMap *vrm;
201-
public:
202-
StandardSpiller(MachineFunctionPass &pass, MachineFunction &mf,
203-
VirtRegMap &vrm)
204-
: mf(&mf),
205-
lis(&pass.getAnalysis<LiveIntervals>()),
206-
lss(&pass.getAnalysis<LiveStacks>()),
207-
loopInfo(pass.getAnalysisIfAvailable<MachineLoopInfo>()),
208-
vrm(&vrm) {}
209-
210-
/// Falls back on LiveIntervals::addIntervalsForSpills.
211-
void spill(LiveRangeEdit &LRE) {
212-
std::vector<LiveInterval*> added =
213-
lis->addIntervalsForSpills(LRE.getParent(), LRE.getUselessVRegs(),
214-
loopInfo, *vrm);
215-
LRE.getNewVRegs()->insert(LRE.getNewVRegs()->end(),
216-
added.begin(), added.end());
217-
218-
// Update LiveStacks.
219-
int SS = vrm->getStackSlot(LRE.getReg());
220-
if (SS == VirtRegMap::NO_STACK_SLOT)
221-
return;
222-
const TargetRegisterClass *RC = mf->getRegInfo().getRegClass(LRE.getReg());
223-
LiveInterval &SI = lss->getOrCreateInterval(SS, RC);
224-
if (!SI.hasAtLeastOneValue())
225-
SI.getNextValue(SlotIndex(), 0, lss->getVNInfoAllocator());
226-
SI.MergeRangesInAsValue(LRE.getParent(), SI.getValNumInfo(0));
227-
}
228-
};
229-
230-
} // end anonymous namespace
231-
232190
llvm::Spiller* llvm::createSpiller(MachineFunctionPass &pass,
233191
MachineFunction &mf,
234192
VirtRegMap &vrm) {
235193
switch (spillerOpt) {
236194
default: assert(0 && "unknown spiller");
237195
case trivial: return new TrivialSpiller(pass, mf, vrm);
238-
case standard: return new StandardSpiller(pass, mf, vrm);
239196
case inline_: return createInlineSpiller(pass, mf, vrm);
240197
}
241198
}

llvm/test/CodeGen/ARM/2010-11-15-SpillEarlyClobber.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s -verify-machineinstrs -spiller=standard
1+
; RUN: llc < %s -verify-machineinstrs -spiller=trivial
22
; RUN: llc < %s -verify-machineinstrs -spiller=inline
33
; PR8612
44
;

0 commit comments

Comments
 (0)