forked from OSchip/llvm-project
[NFC] Remove unnecessary function pass managers
This commit is contained in:
parent
c679fbee2a
commit
18da681034
|
@ -233,9 +233,7 @@ void PassBuilder::invokePeepholeEPCallbacks(FunctionPassManager &FPM,
|
|||
|
||||
// Helper to add AnnotationRemarksPass.
|
||||
static void addAnnotationRemarksPass(ModulePassManager &MPM) {
|
||||
FunctionPassManager FPM;
|
||||
FPM.addPass(AnnotationRemarksPass());
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(AnnotationRemarksPass()));
|
||||
}
|
||||
|
||||
// Helper to check if the current compilation phase is preparing for LTO
|
||||
|
@ -663,13 +661,13 @@ void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM,
|
|||
// Perform PGO instrumentation.
|
||||
MPM.addPass(PGOInstrumentationGen(IsCS));
|
||||
|
||||
FunctionPassManager FPM;
|
||||
// Disable header duplication in loop rotation at -Oz.
|
||||
FPM.addPass(createFunctionToLoopPassAdaptor(
|
||||
LoopRotatePass(Level != OptimizationLevel::Oz), /*UseMemorySSA=*/false,
|
||||
/*UseBlockFrequencyInfo=*/false));
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM),
|
||||
PTO.EagerlyInvalidateAnalyses));
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(
|
||||
createFunctionToLoopPassAdaptor(
|
||||
LoopRotatePass(Level != OptimizationLevel::Oz),
|
||||
/*UseMemorySSA=*/false,
|
||||
/*UseBlockFrequencyInfo=*/false),
|
||||
PTO.EagerlyInvalidateAnalyses));
|
||||
|
||||
// Add the profile lowering pass.
|
||||
InstrProfOptions Options;
|
||||
|
@ -1497,10 +1495,8 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
|
|||
MPM.addPass(InferFunctionAttrsPass());
|
||||
|
||||
if (Level.getSpeedupLevel() > 1) {
|
||||
FunctionPassManager EarlyFPM;
|
||||
EarlyFPM.addPass(CallSiteSplittingPass());
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(
|
||||
std::move(EarlyFPM), PTO.EagerlyInvalidateAnalyses));
|
||||
CallSiteSplittingPass(), PTO.EagerlyInvalidateAnalyses));
|
||||
|
||||
// Indirect call promotion. This should promote all the targets that are
|
||||
// left by the earlier promotion pass that promotes intra-module targets.
|
||||
|
|
Loading…
Reference in New Issue