[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 6 12:56:02 PST 2003


Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.11 -> 1.12

---
Log message:

Add FP stackifier pass
Add peephole optimizer pass


---
Diffs of the changes:

Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.11 llvm/lib/Target/X86/X86TargetMachine.cpp:1.12
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.11	Sat Dec 28 14:33:32 2002
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Mon Jan  6 12:55:04 2003
@@ -9,6 +9,7 @@
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Target/TargetMachineImpls.h"
 #include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/Passes.h"
 #include "llvm/PassManager.h"
 #include "Support/CommandLine.h"
 #include "Support/Statistic.h"
@@ -40,7 +41,6 @@
   FrameInfo(TargetFrameInfo::StackGrowsDown, 1/*16*/, 0) {
 }
 
-
 /// addPassesToJITCompile - Add passes to the specified pass manager to
 /// implement a fast dynamic compiler for this target.  Return true if this is
 /// not supported for this target.
@@ -55,6 +55,8 @@
 
   // TODO: optional optimizations go here
 
+  // FIXME: Add SSA based peephole optimizer here.
+
   // Print the instruction selected machine code...
   if (PrintCode)
     PM.add(createMachineFunctionPrinterPass());
@@ -68,13 +70,18 @@
   if (PrintCode)
     PM.add(createMachineFunctionPrinterPass());
 
+  PM.add(createX86FloatingPointStackifierPass());
+
+  if (PrintCode)
+    PM.add(createMachineFunctionPrinterPass());
+
   // Insert prolog/epilog code.  Eliminate abstract frame index references...
   PM.add(createPrologEpilogCodeInserter());
 
+  PM.add(createX86PeepholeOptimizerPass());
+
   if (PrintCode)  // Print the register-allocated code
     PM.add(createX86CodePrinterPass(std::cerr));
-
-  PM.add(createMachineCodeDestructionPass());
 
   return false; // success!
 }





More information about the llvm-commits mailing list