summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-06-28 21:49:24 +0000
committerJessica Paquette <jpaquette@apple.com>2018-06-28 21:49:24 +0000
commit0c5d3ffbb84027c5046c19bb76edebce64a2bc73 (patch)
treef58712cdba817a6eb7d13f697f89383d27c10d86 /llvm/lib/CodeGen/TargetPassConfig.cpp
parent95d1605bcb214ce9bf348f3dba72d2eff30f2f3e (diff)
downloadbcm5719-llvm-0c5d3ffbb84027c5046c19bb76edebce64a2bc73.tar.gz
bcm5719-llvm-0c5d3ffbb84027c5046c19bb76edebce64a2bc73.zip
[MachineOutliner] Never add the outliner in -O0
This is a recommit of r335879. 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 removes -O0 from the outliner DWARF test. llvm-svn: 335930
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 0ac89917012..044dcf7c749 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -906,7 +906,7 @@ void TargetPassConfig::addMachinePasses() {
addPass(&XRayInstrumentationID, false);
addPass(&PatchableFunctionID, false);
- if (TM->Options.EnableMachineOutliner &&
+ if (TM->Options.EnableMachineOutliner && getOptLevel() != CodeGenOpt::None &&
EnableMachineOutliner)
addPass(createMachineOutlinerPass());
OpenPOWER on IntegriCloud