summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-06-28 17:05:57 +0000
committerJessica Paquette <jpaquette@apple.com>2018-06-28 17:05:57 +0000
commitc9d675266e213ff9311e8b66160781135f0d6971 (patch)
tree0e1a030878e99b111e59ce8ec11de52ff357e462 /llvm/lib/CodeGen
parentce004bfe35c20d227865605427a11ff90ccb23b3 (diff)
downloadbcm5719-llvm-c9d675266e213ff9311e8b66160781135f0d6971.tar.gz
bcm5719-llvm-c9d675266e213ff9311e8b66160781135f0d6971.zip
[MachineOutliner] Never add the outliner in -O0
We shouldn't add the outliner when compiling at -O0 even if -enable-machine-outliner is passed in. This makes sure that we don't add it in this case. This also updates machine-outliner-flags to reflect the change and improves the comment describing what that test does. llvm-svn: 335879
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 20771eef620..74cd56b40a7 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -914,7 +914,8 @@ void TargetPassConfig::addMachinePasses() {
addPass(&XRayInstrumentationID, false);
addPass(&PatchableFunctionID, false);
- if (EnableMachineOutliner == AlwaysOutline)
+ if (getOptLevel() != CodeGenOpt::None &&
+ EnableMachineOutliner == AlwaysOutline)
addPass(createMachineOutlinerPass());
// Add passes that directly emit MI after all other MI passes.
OpenPOWER on IntegriCloud