[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 1 22:19:38 PST 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCTargetMachine.cpp updated: 1.44 -> 1.45
---
Log message:
Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
Loop Strength Reduction.
---
Diffs of the changes: (+10 -0)
PowerPCTargetMachine.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.44 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.45
--- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.44 Sun Dec 12 11:40:24 2004
+++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Wed Mar 2 00:19:22 2005
@@ -33,6 +33,10 @@
cl::opt<bool> AIX("aix",
cl::desc("Generate AIX/xcoff instead of Darwin/MachO"),
cl::Hidden);
+
+ cl::opt<bool> EnablePPCLSR("enable-lsr-for-ppc",
+ cl::desc("Enable LSR for PPC (beta option!)"),
+ cl::Hidden);
}
namespace {
@@ -70,6 +74,9 @@
bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
std::ostream &Out) {
bool LP64 = (0 != dynamic_cast<PPC64TargetMachine *>(this));
+
+ if (EnablePPCLSR)
+ PM.add(createLoopStrengthReducePass());
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
@@ -113,6 +120,9 @@
}
void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
+ if (EnablePPCLSR)
+ PM.add(createLoopStrengthReducePass());
+
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
More information about the llvm-commits
mailing list