Make LLI behave just like LLC with regard to the compile passes it uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6444 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index 1ca04a6..e79906d 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -208,8 +208,20 @@
//so %fp+offset-8 and %fp+offset-16 are empty slots now!
PM.add(createStackSlotsPass(*this));
+ // Specialize LLVM code for this target machine and then
+ // run basic dataflow optimizations on LLVM code.
+ if (!DisablePreSelect) {
+ PM.add(createPreSelectionPass(*this));
+ PM.add(createReassociatePass());
+ PM.add(createLICMPass());
+ PM.add(createGCSEPass());
+ }
+
PM.add(createInstructionSelectionPass(*this));
+ if (!DisableSched)
+ PM.add(createInstructionSchedulingWithSSAPass(*this));
+
// new pass: convert Value* in MachineOperand to an unsigned register
// this brings it in line with what the X86 JIT's RegisterAllocator expects
//PM.add(createAddRegNumToValuesPass());
@@ -217,5 +229,8 @@
PM.add(getRegisterAllocator(*this));
PM.add(getPrologEpilogInsertionPass());
+ if (!DisablePeephole)
+ PM.add(createPeepholeOptsPass(*this));
+
return false; // success!
}