diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 20a83c97302..a8d7955ef54 100644 --- a/gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/gnu/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -23,8 +23,8 @@ #include "llvm/ADT/Triple.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/TargetLoweringObjectFile.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" @@ -32,6 +32,7 @@ #include "llvm/Support/CodeGen.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/TargetRegistry.h" +#include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Transforms/Scalar.h" #include <cassert> @@ -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>(); @@ -343,7 +349,7 @@ void PPCPassConfig::addIRPasses() { // Call SeparateConstOffsetFromGEP pass to extract constants within indices // and lower a GEP with multiple indices to either arithmetic operations or // multiple GEPs with single index. - addPass(createSeparateConstOffsetFromGEPPass(TM, true)); + addPass(createSeparateConstOffsetFromGEPPass(true)); // Call EarlyCSE pass to find and remove subexpressions in the lowered // result. addPass(createEarlyCSEPass()); |
