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

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 5 11:35:01 PDT 2003


Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.20 -> 1.21

---
Log message:

Factor shared code


---
Diffs of the changes:

Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.20 llvm/lib/Target/X86/X86TargetMachine.cpp:1.21
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.20	Sat Jul 26 18:49:58 2003
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Tue Aug  5 11:34:44 2003
@@ -41,15 +41,12 @@
   FrameInfo(TargetFrameInfo::StackGrowsDown, 8/*16 for SSE*/, 4) {
 }
 
-// llc backend for x86
+
+// addPassesToEmitAssembly - We currently use all of the same passes as the JIT
+// does to emit statically compiled machine code.
 bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
 					       std::ostream &Out) {
-  PM.add(createLowerSwitchPass());
-  PM.add(createX86SimpleInstructionSelector(*this));
-  PM.add(createLocalRegisterAllocator());
-  PM.add(createX86FloatingPointStackifierPass());
-  PM.add(createPrologEpilogCodeInserter());
-  PM.add(createX86PeepholeOptimizerPass());
+  addPassesToJITCompile(PM);
   PM.add(createX86CodePrinterPass(Out, *this));
   return false; // success!
 }
@@ -93,7 +90,6 @@
 
   if (PrintCode)  // Print the register-allocated code
     PM.add(createX86CodePrinterPass(std::cerr, *this));
-
   return false; // success!
 }
 





More information about the llvm-commits mailing list