* Initialize new FrameInfo member
authorChris Lattner <sabre@nondot.org>
Sat, 28 Dec 2002 20:33:32 +0000 (20:33 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Dec 2002 20:33:32 +0000 (20:33 +0000)
* most pass ctors no longer take TM arguments
* New prolog/epilog insertion pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5188 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp

index 0fc56611f455e4493c7c319e0f9d123a306a1758..7075a3324a0c8296680032a5ba6089befcc008b0 100644 (file)
@@ -36,7 +36,8 @@ X86TargetMachine::X86TargetMachine(unsigned Config)
                  (Config & TM::EndianMask) == TM::LittleEndian,
                  1, 4, 
                  (Config & TM::PtrSizeMask) == TM::PtrSize64 ? 8 : 4,
-                 (Config & TM::PtrSizeMask) == TM::PtrSize64 ? 8 : 4) {
+                 (Config & TM::PtrSizeMask) == TM::PtrSize64 ? 8 : 4),
+  FrameInfo(TargetFrameInfo::StackGrowsDown, 1/*16*/, 0) {
 }
 
 
@@ -60,12 +61,18 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
 
   // Perform register allocation to convert to a concrete x86 representation
   if (NoLocalRA)
-    PM.add(createSimpleRegisterAllocator(*this));
+    PM.add(createSimpleRegisterAllocator());
   else
-    PM.add(createLocalRegisterAllocator(*this));
+    PM.add(createLocalRegisterAllocator());
+
+  if (PrintCode)
+    PM.add(createMachineFunctionPrinterPass());
+
+  // Insert prolog/epilog code.  Eliminate abstract frame index references...
+  PM.add(createPrologEpilogCodeInserter());
 
   if (PrintCode)  // Print the register-allocated code
-    PM.add(createX86CodePrinterPass(*this, std::cerr));
+    PM.add(createX86CodePrinterPass(std::cerr));
 
   PM.add(createMachineCodeDestructionPass());