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
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index f5ac9a5..03de739 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -116,17 +116,12 @@
 
 
 SparcTargetMachine::SparcTargetMachine(IntrinsicLowering *il)
-  : TargetMachine("UltraSparc-Native", false),
-    IL(il ? il : new DefaultIntrinsicLowering()),
+  : TargetMachine("UltraSparc-Native", il, false),
     schedInfo(*this),
     regInfo(*this),
     frameInfo(*this),
     cacheInfo(*this),
-    jitInfo(*this, *IL) {
-}
-
-SparcTargetMachine::~SparcTargetMachine() {
-  delete IL;
+    jitInfo(*this) {
 }
 
 // addPassesToEmitAssembly - This method controls the entire code generation
@@ -171,7 +166,7 @@
     PM.add(new PrintFunctionPass("Input code to instr. selection:\n",
                                  &std::cerr));
 
-  PM.add(createInstructionSelectionPass(*this, *IL));
+  PM.add(createInstructionSelectionPass(*this));
 
   if (!DisableSched)
     PM.add(createInstructionSchedulingWithSSAPass(*this));
@@ -238,7 +233,7 @@
   //PM.add(createLICMPass());
   //PM.add(createGCSEPass());
 
-  PM.add(createInstructionSelectionPass(TM, IL));
+  PM.add(createInstructionSelectionPass(TM));
 
   PM.add(getRegisterAllocator(TM));
   PM.add(createPrologEpilogInsertionPass());