Changed codegen to add 2 empty slots at the top of stack using StackSlots pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3873 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 8d9a832..a30f93e 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -9,6 +9,7 @@
 #include "llvm/Target/MachineInstrInfo.h"
 #include "llvm/Target/MachineCacheInfo.h"
 #include "llvm/CodeGen/PreSelection.h"
+#include "llvm/CodeGen/StackSlots.h"
 #include "llvm/CodeGen/InstrSelection.h"
 #include "llvm/CodeGen/InstrScheduling.h"
 #include "llvm/CodeGen/RegisterAllocation.h"
@@ -119,6 +120,10 @@
   // Construct and initialize the MachineCodeForMethod object for this fn.
   PM.add(new ConstructMachineCodeForFunction(*this));
 
+  //Insert empty stackslots in the stack frame of each function
+  //so %fp+offset-8 and %fp+offset-16 are empty slots now!
+  PM.add(createStackSlotsPass(*this));
+
   // Specialize LLVM code for this target machine and then
   // run basic dataflow optimizations on LLVM code.
   if (!DisablePreSelect)