diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-28 21:23:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-28 21:23:38 +0000 |
commit | f70e0c216c074bd2ae2b08178f5512849545db4e (patch) | |
tree | ecfce5ac045e092db18b62c4cc5f4903749e9e45 /lib/Target/X86/X86TargetMachine.cpp | |
parent | 27490a6fcc8e24be0ee4ddfcdbdf7e9da9e5af41 (diff) |
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index e4d1ecb9b1..879ad50311 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -45,15 +45,10 @@ TargetMachine *llvm::allocateX86TargetMachine(const Module &M, /// X86TargetMachine ctor - Create an ILP32 architecture model /// -X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *il) - : TargetMachine("X86", true, 4, 4, 4, 4, 4), - IL(il ? il : new DefaultIntrinsicLowering()), +X86TargetMachine::X86TargetMachine(const Module &M, IntrinsicLowering *IL) + : TargetMachine("X86", IL, true, 4, 4, 4, 4, 4), FrameInfo(TargetFrameInfo::StackGrowsDown, 8/*16 for SSE*/, 4), - JITInfo(*this, *IL) { -} - -X86TargetMachine::~X86TargetMachine() { - delete IL; + JITInfo(*this) { } @@ -72,9 +67,9 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, PM.add(createCFGSimplificationPass()); if (NoPatternISel) - PM.add(createX86SimpleInstructionSelector(*this, *IL)); + PM.add(createX86SimpleInstructionSelector(*this)); else - PM.add(createX86PatternInstructionSelector(*this, *IL)); + PM.add(createX86PatternInstructionSelector(*this)); // Run optional SSA-based machine code optimizations next... if (!NoSSAPeephole) @@ -127,9 +122,9 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { PM.add(createCFGSimplificationPass()); if (NoPatternISel) - PM.add(createX86SimpleInstructionSelector(TM, IL)); + PM.add(createX86SimpleInstructionSelector(TM)); else - PM.add(createX86PatternInstructionSelector(TM, IL)); + PM.add(createX86PatternInstructionSelector(TM)); // Run optional SSA-based machine code optimizations next... if (!NoSSAPeephole) |