summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-28 21:23:38 +0000
committerChris Lattner <sabre@nondot.org>2003-12-28 21:23:38 +0000
commit5d236005b0eaffbd59d24a8c3267d642398a3ea6 (patch)
tree35d556f52e9d780516b4d1b3fa1df228844115bd /llvm/lib/Target/X86/X86TargetMachine.cpp
parenta158dc81047e36e8250b8ed44fb12a7e2895326a (diff)
downloadbcm5719-llvm-5d236005b0eaffbd59d24a8c3267d642398a3ea6.tar.gz
bcm5719-llvm-5d236005b0eaffbd59d24a8c3267d642398a3ea6.zip
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly. llvm-svn: 10636
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index e4d1ecb9b14..879ad503117 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud