diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-05 16:34:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-05 16:34:44 +0000 |
commit | c9bbfbc04e6e8c946851565c2c686c39297ced76 (patch) | |
tree | 2b0a272ade8cd2aa53f7d3e017a24a31caa79dfe | |
parent | 122558b05bb753894adc7d925f69dc9ddfa586fa (diff) | |
download | external_llvm-c9bbfbc04e6e8c946851565c2c686c39297ced76.zip external_llvm-c9bbfbc04e6e8c946851565c2c686c39297ced76.tar.gz external_llvm-c9bbfbc04e6e8c946851565c2c686c39297ced76.tar.bz2 |
Factor shared code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index a3aa458..893e62f 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -41,15 +41,12 @@ X86TargetMachine::X86TargetMachine(unsigned Config) 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 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) { if (PrintCode) // Print the register-allocated code PM.add(createX86CodePrinterPass(std::cerr, *this)); - return false; // success! } |