aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-02 06:19:22 +0000
committerChris Lattner <sabre@nondot.org>2005-03-02 06:19:22 +0000
commit0c7490617a62b0622d52949c0651da907b3d6c04 (patch)
tree3dd5d878ba3a65afbc3721f92a393a6ffeaad928 /lib/Target/PowerPC/PPCTargetMachine.cpp
parent1af69a81310597bd748a1a826f78929a48f411e1 (diff)
Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
Loop Strength Reduction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 01d2d23136..4bc5c50211 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -33,6 +33,10 @@ namespace llvm {
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 @@ unsigned PPC32TargetMachine::getJITMatchQuality() {
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 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
}
void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
+ if (EnablePPCLSR)
+ PM.add(createLoopStrengthReducePass());
+
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());