Misc. SSE2 intrinsics: clflush, lfench, mfence
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetMachine.cpp
index 6fe41ea51aeb16fdaec98ad35aa43be1a4b9b19f..94136a456962b19723798366552af9583c221460 100644 (file)
@@ -18,7 +18,6 @@
 #include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/Analysis/Verifier.h"
-#include "llvm/CodeGen/IntrinsicLowering.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/Target/TargetOptions.h"
@@ -58,9 +57,8 @@ unsigned PPCTargetMachine::getModuleMatchQuality(const Module &M) {
   return getJITMatchQuality()/2;
 }
 
-PPCTargetMachine::PPCTargetMachine(const Module &M, IntrinsicLowering *IL,
-                                   const std::string &FS)
-: TargetMachine("PowerPC", IL, false, 4, 4, 4, 4, 4, 4, 2, 1, 1),
+PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS)
+: TargetMachine("PowerPC", false, 4, 4, 4, 4, 4, 4, 2, 1, 1),
   Subtarget(M, FS), FrameInfo(*this, false), JITInfo(*this),
   TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()) {
   if (TargetDefault == PPCTarget) {
@@ -84,7 +82,7 @@ bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM,
   if (FileType != TargetMachine::AssemblyFile) return true;
   
   // Run loop strength reduction before anything else.
-  if (!Fast) PM.add(createLoopStrengthReducePass());
+  if (!Fast) PM.add(createLoopStrengthReducePass(&TLInfo));
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
@@ -95,9 +93,6 @@ bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM,
   // Clean up after other passes, e.g. merging critical edges.
   if (!Fast) PM.add(createCFGSimplificationPass());
 
-  // FIXME: Implement the switch instruction in the instruction selector!
-  PM.add(createLowerSwitchPass());
-
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());
 
@@ -138,7 +133,7 @@ void PPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
   TM.setRelocationModel(Reloc::DynamicNoPIC);
 
   // Run loop strength reduction before anything else.
-  PM.add(createLoopStrengthReducePass());
+  PM.add(createLoopStrengthReducePass(TM.getTargetLowering()));
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
@@ -149,9 +144,6 @@ void PPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
   // Clean up after other passes, e.g. merging critical edges.
   PM.add(createCFGSimplificationPass());
 
-  // FIXME: Implement the switch instruction in the instruction selector!
-  PM.add(createLowerSwitchPass());
-
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());