From 0c5d3ffbb84027c5046c19bb76edebce64a2bc73 Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Thu, 28 Jun 2018 21:49:24 +0000 Subject: [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 --- llvm/lib/CodeGen/TargetPassConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') 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()); -- cgit v1.2.3