summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorJinsong Ji <jji@us.ibm.com>2019-06-11 17:40:39 +0000
committerJinsong Ji <jji@us.ibm.com>2019-06-11 17:40:39 +0000
commitef2d6d99c0d35e46dce7fff6b999a3a1fc08aecc (patch)
tree369254d29d2d73748da2021485274636c058c5b3 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parent10c085554215e84831d272f2e6a93b7c70d143bf (diff)
downloadbcm5719-llvm-ef2d6d99c0d35e46dce7fff6b999a3a1fc08aecc.tar.gz
bcm5719-llvm-ef2d6d99c0d35e46dce7fff6b999a3a1fc08aecc.zip
[PowerPC] Enable MachinePipeliner for P9 with -ppc-enable-pipeliner
Implement necessary target hooks to enable MachinePipeliner for P9 only. The pass is off by default, can be enabled with -ppc-enable-pipeliner for P9. Differential Revision: https://reviews.llvm.org/D62164 llvm-svn: 363085
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index da1121bac9c..fcaf7d6e3ee 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -488,6 +488,9 @@ void PPCPassConfig::addPreRegAlloc() {
}
if (EnableExtraTOCRegDeps)
addPass(createPPCTOCRegDepsPass());
+
+ if (getOptLevel() != CodeGenOpt::None)
+ addPass(&MachinePipelinerID);
}
void PPCPassConfig::addPreSched2() {
OpenPOWER on IntegriCloud