[AVR] Enable the ISel, frame analyzer, and alloca passes
authorDylan McKay <dylanmckay34@gmail.com>
Mon, 7 Nov 2016 06:02:55 +0000 (06:02 +0000)
committerDylan McKay <dylanmckay34@gmail.com>
Mon, 7 Nov 2016 06:02:55 +0000 (06:02 +0000)
llvm-svn: 286095

llvm/lib/Target/AVR/AVRTargetMachine.cpp

index f630a5d..e1a6727 100644 (file)
@@ -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