forked from OSchip/llvm-project
Enable InsertFreeze flag of JumpThreading when used in LTO
This patch enables inserting freeze when JumpThreading converts a select to a conditional branch when it is run in LTO. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D85534
This commit is contained in:
parent
f51e55e09e
commit
1b9884df8d
|
@ -1508,7 +1508,7 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, bool DebugLogging,
|
|||
FPM.addPass(InstCombinePass());
|
||||
invokePeepholeEPCallbacks(FPM, Level);
|
||||
|
||||
FPM.addPass(JumpThreadingPass());
|
||||
FPM.addPass(JumpThreadingPass(/*InsertFreezeWhenUnfoldingSelect*/ true));
|
||||
|
||||
// Do a post inline PGO instrumentation and use pass. This is a context
|
||||
// sensitive PGO pass.
|
||||
|
@ -1575,7 +1575,7 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, bool DebugLogging,
|
|||
|
||||
MainFPM.addPass(InstCombinePass());
|
||||
invokePeepholeEPCallbacks(MainFPM, Level);
|
||||
MainFPM.addPass(JumpThreadingPass());
|
||||
MainFPM.addPass(JumpThreadingPass(/*InsertFreezeWhenUnfoldingSelect*/ true));
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(MainFPM)));
|
||||
|
||||
// Create a function that performs CFI checks for cross-DSO calls with
|
||||
|
|
|
@ -998,7 +998,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
|||
// The IPO passes may leave cruft around. Clean up after them.
|
||||
PM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, PM);
|
||||
PM.add(createJumpThreadingPass());
|
||||
PM.add(createJumpThreadingPass(/*FreezeSelectCond*/ true));
|
||||
|
||||
// Break up allocas
|
||||
PM.add(createSROAPass());
|
||||
|
@ -1061,7 +1061,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
|||
PM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, PM);
|
||||
|
||||
PM.add(createJumpThreadingPass());
|
||||
PM.add(createJumpThreadingPass(/*FreezeSelectCond*/ true));
|
||||
}
|
||||
|
||||
void PassManagerBuilder::addLateLTOOptimizationPasses(
|
||||
|
|
Loading…
Reference in New Issue