diff options
| author | Stefan Pintilie <stefanp@ca.ibm.com> | 2018-07-04 18:54:25 +0000 |
|---|---|---|
| committer | Stefan Pintilie <stefanp@ca.ibm.com> | 2018-07-04 18:54:25 +0000 |
| commit | cb4f0c5c07af1ce096c1609bd6576a0aee57700a (patch) | |
| tree | 5123514d4ab99e117e3c0103b558b31551332f7f /llvm/lib/Target/PowerPC | |
| parent | bea19a9493b7286a0c79a8be2b788bed8cb4cfa9 (diff) | |
| download | bcm5719-llvm-cb4f0c5c07af1ce096c1609bd6576a0aee57700a.tar.gz bcm5719-llvm-cb4f0c5c07af1ce096c1609bd6576a0aee57700a.zip | |
[PowerPC] Replace the Post RA List Scheduler with the Machine Scheduler
We want to run the Machine Scheduler instead of the List Scheduler after RA.
Checked with a performance run on a Power 9 machine with SPEC 2006 and while
some benchmarks improved and others degraded the geomean was slightly improved
with the Machine Scheduler.
Differential Revision: https://reviews.llvm.org/D45265
llvm-svn: 336295
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 2cd7f1cebf5..a8d7955ef54 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -24,6 +24,7 @@ #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetPassConfig.h" +#include "llvm/CodeGen/MachineScheduler.h" #include "llvm/IR/Attributes.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Function.h" @@ -303,7 +304,12 @@ namespace { class PPCPassConfig : public TargetPassConfig { public: PPCPassConfig(PPCTargetMachine &TM, PassManagerBase &PM) - : TargetPassConfig(TM, PM) {} + : TargetPassConfig(TM, PM) { + // At any optimization level above -O0 we use the Machine Scheduler and not + // the default Post RA List Scheduler. + if (TM.getOptLevel() != CodeGenOpt::None) + substitutePass(&PostRASchedulerID, &PostMachineSchedulerID); + } PPCTargetMachine &getPPCTargetMachine() const { return getTM<PPCTargetMachine>(); |

