From c988b334b6a97a87b887df7aa22500961faf7701 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Mon, 7 Nov 2016 06:02:55 +0000 Subject: [PATCH] [AVR] Enable the ISel, frame analyzer, and alloca passes llvm-svn: 286095 --- llvm/lib/Target/AVR/AVRTargetMachine.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/AVR/AVRTargetMachine.cpp b/llvm/lib/Target/AVR/AVRTargetMachine.cpp index f630a5d..e1a6727 100644 --- a/llvm/lib/Target/AVR/AVRTargetMachine.cpp +++ b/llvm/lib/Target/AVR/AVRTargetMachine.cpp @@ -93,15 +93,21 @@ const AVRSubtarget *AVRTargetMachine::getSubtargetImpl(const Function &) const { //===----------------------------------------------------------------------===// bool AVRPassConfig::addInstSelector() { + // Install an instruction selector. + addPass(createAVRISelDag(getAVRTargetMachine(), getOptLevel())); + // Create the frame analyzer pass used by the PEI pass. + addPass(createAVRFrameAnalyzerPass()); + return false; } void AVRPassConfig::addPreRegAlloc() { + // Create the dynalloc SP save/restore pass to handle variable sized allocas. + addPass(createAVRDynAllocaSRPass()); } void AVRPassConfig::addPreSched2() { } -void AVRPassConfig::addPreEmitPass() { -} +void AVRPassConfig::addPreEmitPass() { } } // end of namespace llvm -- 2.7.4