• Home
  • Raw
  • Download

Lines Matching refs:MPM

511 static void addAnnotationRemarksPass(ModulePassManager &MPM) {  in addAnnotationRemarksPass()  argument
514 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in addAnnotationRemarksPass()
829 void PassBuilder::addRequiredLTOPreLinkPasses(ModulePassManager &MPM) { in addRequiredLTOPreLinkPasses() argument
830 MPM.addPass(CanonicalizeAliasesPass()); in addRequiredLTOPreLinkPasses()
831 MPM.addPass(NameAnonGlobalPass()); in addRequiredLTOPreLinkPasses()
834 void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM, in addPGOInstrPasses() argument
866 MPM.addPass(std::move(MIWP)); in addPGOInstrPasses()
871 MPM.addPass(GlobalDCEPass()); in addPGOInstrPasses()
876 MPM.addPass(PGOInstrumentationUse(ProfileFile, ProfileRemappingFile, IsCS)); in addPGOInstrPasses()
879 MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>()); in addPGOInstrPasses()
884 MPM.addPass(PGOInstrumentationGen(IsCS)); in addPGOInstrPasses()
891 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in addPGOInstrPasses()
900 MPM.addPass(InstrProfiling(Options, IsCS)); in addPGOInstrPasses()
903 void PassBuilder::addPGOInstrPassesForO0(ModulePassManager &MPM, in addPGOInstrPassesForO0() argument
909 MPM.addPass(PGOInstrumentationUse(ProfileFile, ProfileRemappingFile, IsCS)); in addPGOInstrPassesForO0()
912 MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>()); in addPGOInstrPassesForO0()
917 MPM.addPass(PGOInstrumentationGen(IsCS)); in addPGOInstrPassesForO0()
925 MPM.addPass(InstrProfiling(Options, IsCS)); in addPGOInstrPassesForO0()
1004 ModulePassManager MPM(DebugLogging); in buildModuleSimplificationPipeline() local
1010 MPM.addPass(SampleProfileProbePass(TM)); in buildModuleSimplificationPipeline()
1036 MPM.addPass(PGOIndirectCallPromotion(true /* InLTO */, HasSampleProfile)); in buildModuleSimplificationPipeline()
1040 MPM.addPass(InferFunctionAttrsPass()); in buildModuleSimplificationPipeline()
1062 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(EarlyFPM))); in buildModuleSimplificationPipeline()
1067 MPM.addPass(SampleProfileLoaderPass(PGOOpt->ProfileFile, in buildModuleSimplificationPipeline()
1072 MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>()); in buildModuleSimplificationPipeline()
1080 MPM.addPass(PGOIndirectCallPromotion(Phase == ThinLTOPhase::PostLink, in buildModuleSimplificationPipeline()
1085 MPM.addPass(AttributorPass()); in buildModuleSimplificationPipeline()
1091 MPM.addPass(LowerTypeTestsPass(nullptr, nullptr, true)); in buildModuleSimplificationPipeline()
1094 C(MPM, Level); in buildModuleSimplificationPipeline()
1100 MPM.addPass(IPSCCPPass()); in buildModuleSimplificationPipeline()
1104 MPM.addPass(CalledValuePropagationPass()); in buildModuleSimplificationPipeline()
1107 MPM.addPass(GlobalOptPass()); in buildModuleSimplificationPipeline()
1114 MPM.addPass(createModuleToFunctionPassAdaptor(PromotePass())); in buildModuleSimplificationPipeline()
1118 MPM.addPass(DeadArgumentEliminationPass()); in buildModuleSimplificationPipeline()
1127 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(GlobalCleanupPM))); in buildModuleSimplificationPipeline()
1133 addPGOInstrPasses(MPM, Level, in buildModuleSimplificationPipeline()
1137 MPM.addPass(PGOIndirectCallPromotion(false, false)); in buildModuleSimplificationPipeline()
1141 MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->CSProfileGenFile)); in buildModuleSimplificationPipeline()
1145 MPM.addPass(SyntheticCountsPropagation()); in buildModuleSimplificationPipeline()
1148 MPM.addPass(buildInlinerPipeline(Level, Phase, /*MandatoryOnly=*/true)); in buildModuleSimplificationPipeline()
1149 MPM.addPass(buildInlinerPipeline(Level, Phase, /*MandatoryOnly=*/false)); in buildModuleSimplificationPipeline()
1152 MPM.addPass(createModuleToFunctionPassAdaptor(MemProfilerPass())); in buildModuleSimplificationPipeline()
1153 MPM.addPass(ModuleMemProfilerPass()); in buildModuleSimplificationPipeline()
1156 return MPM; in buildModuleSimplificationPipeline()
1162 ModulePassManager MPM(DebugLogging); in buildModuleOptimizationPipeline() local
1165 MPM.addPass(GlobalOptPass()); in buildModuleOptimizationPipeline()
1166 MPM.addPass(GlobalDCEPass()); in buildModuleOptimizationPipeline()
1171 MPM.addPass(PartialInlinerPass()); in buildModuleOptimizationPipeline()
1183 MPM.addPass(EliminateAvailableExternallyPass()); in buildModuleOptimizationPipeline()
1186 MPM.addPass(InstrOrderFilePass()); in buildModuleOptimizationPipeline()
1191 MPM.addPass(ReversePostOrderFunctionAttrsPass()); in buildModuleOptimizationPipeline()
1199 addPGOInstrPasses(MPM, Level, /* RunProfileGen */ true, in buildModuleOptimizationPipeline()
1203 addPGOInstrPasses(MPM, Level, /* RunProfileGen */ false, in buildModuleOptimizationPipeline()
1215 MPM.addPass(RequireAnalysisPass<GlobalsAA, Module>()); in buildModuleOptimizationPipeline()
1317 MPM.addPass(HotColdSplittingPass()); in buildModuleOptimizationPipeline()
1346 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(OptimizePM))); in buildModuleOptimizationPipeline()
1349 C(MPM, Level); in buildModuleOptimizationPipeline()
1352 MPM.addPass(CGProfilePass()); in buildModuleOptimizationPipeline()
1358 MPM.addPass(GlobalDCEPass()); in buildModuleOptimizationPipeline()
1359 MPM.addPass(ConstantMergePass()); in buildModuleOptimizationPipeline()
1361 return MPM; in buildModuleOptimizationPipeline()
1370 ModulePassManager MPM(DebugLogging); in buildPerModuleDefaultPipeline() local
1373 MPM.addPass(Annotation2MetadataPass()); in buildPerModuleDefaultPipeline()
1376 MPM.addPass(ForceFunctionAttrsPass()); in buildPerModuleDefaultPipeline()
1380 C(MPM, Level); in buildPerModuleDefaultPipeline()
1383 MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass())); in buildPerModuleDefaultPipeline()
1386 MPM.addPass(buildModuleSimplificationPipeline(Level, ThinLTOPhase::None)); in buildPerModuleDefaultPipeline()
1389 MPM.addPass(buildModuleOptimizationPipeline(Level, LTOPreLink)); in buildPerModuleDefaultPipeline()
1392 addAnnotationRemarksPass(MPM); in buildPerModuleDefaultPipeline()
1395 addRequiredLTOPreLinkPasses(MPM); in buildPerModuleDefaultPipeline()
1397 return MPM; in buildPerModuleDefaultPipeline()
1405 ModulePassManager MPM(DebugLogging); in buildThinLTOPreLinkDefaultPipeline() local
1408 MPM.addPass(Annotation2MetadataPass()); in buildThinLTOPreLinkDefaultPipeline()
1411 MPM.addPass(ForceFunctionAttrsPass()); in buildThinLTOPreLinkDefaultPipeline()
1414 MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass())); in buildThinLTOPreLinkDefaultPipeline()
1418 C(MPM, Level); in buildThinLTOPreLinkDefaultPipeline()
1423 MPM.addPass(buildModuleSimplificationPipeline(Level, ThinLTOPhase::PreLink)); in buildThinLTOPreLinkDefaultPipeline()
1433 MPM.addPass(PartialInlinerPass()); in buildThinLTOPreLinkDefaultPipeline()
1436 MPM.addPass(GlobalOptPass()); in buildThinLTOPreLinkDefaultPipeline()
1442 MPM.addPass(createModuleToFunctionPassAdaptor(CoroCleanupPass())); in buildThinLTOPreLinkDefaultPipeline()
1445 addAnnotationRemarksPass(MPM); in buildThinLTOPreLinkDefaultPipeline()
1447 addRequiredLTOPreLinkPasses(MPM); in buildThinLTOPreLinkDefaultPipeline()
1449 return MPM; in buildThinLTOPreLinkDefaultPipeline()
1454 ModulePassManager MPM(DebugLogging); in buildThinLTODefaultPipeline() local
1457 MPM.addPass(Annotation2MetadataPass()); in buildThinLTODefaultPipeline()
1475 MPM.addPass(WholeProgramDevirtPass(nullptr, ImportSummary)); in buildThinLTODefaultPipeline()
1476 MPM.addPass(LowerTypeTestsPass(nullptr, ImportSummary)); in buildThinLTODefaultPipeline()
1480 return MPM; in buildThinLTODefaultPipeline()
1483 MPM.addPass(ForceFunctionAttrsPass()); in buildThinLTODefaultPipeline()
1486 MPM.addPass(buildModuleSimplificationPipeline(Level, ThinLTOPhase::PostLink)); in buildThinLTODefaultPipeline()
1489 MPM.addPass(buildModuleOptimizationPipeline(Level)); in buildThinLTODefaultPipeline()
1492 addAnnotationRemarksPass(MPM); in buildThinLTODefaultPipeline()
1494 return MPM; in buildThinLTODefaultPipeline()
1509 ModulePassManager MPM(DebugLogging); in buildLTODefaultPipeline() local
1512 MPM.addPass(Annotation2MetadataPass()); in buildLTODefaultPipeline()
1517 MPM.addPass(WholeProgramDevirtPass(ExportSummary, nullptr)); in buildLTODefaultPipeline()
1518 MPM.addPass(LowerTypeTestsPass(ExportSummary, nullptr)); in buildLTODefaultPipeline()
1521 MPM.addPass(LowerTypeTestsPass(nullptr, nullptr, true)); in buildLTODefaultPipeline()
1524 addAnnotationRemarksPass(MPM); in buildLTODefaultPipeline()
1526 return MPM; in buildLTODefaultPipeline()
1531 MPM.addPass(SampleProfileLoaderPass(PGOOpt->ProfileFile, in buildLTODefaultPipeline()
1536 MPM.addPass(RequireAnalysisPass<ProfileSummaryAnalysis, Module>()); in buildLTODefaultPipeline()
1541 MPM.addPass(GlobalDCEPass()); in buildLTODefaultPipeline()
1544 MPM.addPass(ForceFunctionAttrsPass()); in buildLTODefaultPipeline()
1548 MPM.addPass(InferFunctionAttrsPass()); in buildLTODefaultPipeline()
1553 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(EarlyFPM))); in buildLTODefaultPipeline()
1559 MPM.addPass(PGOIndirectCallPromotion( in buildLTODefaultPipeline()
1564 MPM.addPass(IPSCCPPass()); in buildLTODefaultPipeline()
1568 MPM.addPass(CalledValuePropagationPass()); in buildLTODefaultPipeline()
1572 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor( in buildLTODefaultPipeline()
1578 MPM.addPass(ReversePostOrderFunctionAttrsPass()); in buildLTODefaultPipeline()
1581 MPM.addPass(GlobalSplitPass()); in buildLTODefaultPipeline()
1585 MPM.addPass(WholeProgramDevirtPass(ExportSummary, nullptr)); in buildLTODefaultPipeline()
1591 MPM.addPass(LowerTypeTestsPass(ExportSummary, nullptr)); in buildLTODefaultPipeline()
1595 MPM.addPass(LowerTypeTestsPass(nullptr, nullptr, true)); in buildLTODefaultPipeline()
1598 addAnnotationRemarksPass(MPM); in buildLTODefaultPipeline()
1600 return MPM; in buildLTODefaultPipeline()
1604 MPM.addPass(GlobalOptPass()); in buildLTODefaultPipeline()
1607 MPM.addPass(createModuleToFunctionPassAdaptor(PromotePass())); in buildLTODefaultPipeline()
1611 MPM.addPass(ConstantMergePass()); in buildLTODefaultPipeline()
1614 MPM.addPass(DeadArgumentEliminationPass()); in buildLTODefaultPipeline()
1626 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(PeepholeFPM))); in buildLTODefaultPipeline()
1628 MPM.addPass(ModuleInlinerWrapperPass(getInlineParamsFromOptLevel(Level), in buildLTODefaultPipeline()
1636 MPM.addPass(ModuleInlinerWrapperPass(getInlineParamsFromOptLevel(Level), in buildLTODefaultPipeline()
1640 MPM.addPass(GlobalOptPass()); in buildLTODefaultPipeline()
1644 MPM.addPass(GlobalDCEPass()); in buildLTODefaultPipeline()
1657 addPGOInstrPasses(MPM, Level, /* RunProfileGen */ true, in buildLTODefaultPipeline()
1661 addPGOInstrPasses(MPM, Level, /* RunProfileGen */ false, in buildLTODefaultPipeline()
1674 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in buildLTODefaultPipeline()
1676 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor( in buildLTODefaultPipeline()
1719 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(MainFPM))); in buildLTODefaultPipeline()
1723 MPM.addPass(CrossDSOCFIPass()); in buildLTODefaultPipeline()
1729 MPM.addPass(LowerTypeTestsPass(ExportSummary, nullptr)); in buildLTODefaultPipeline()
1732 MPM.addPass(LowerTypeTestsPass(nullptr, nullptr, true)); in buildLTODefaultPipeline()
1737 MPM.addPass(HotColdSplittingPass()); in buildLTODefaultPipeline()
1741 MPM.addPass(createModuleToFunctionPassAdaptor(SimplifyCFGPass())); in buildLTODefaultPipeline()
1744 MPM.addPass(EliminateAvailableExternallyPass()); in buildLTODefaultPipeline()
1747 MPM.addPass(GlobalDCEPass()); in buildLTODefaultPipeline()
1750 addAnnotationRemarksPass(MPM); in buildLTODefaultPipeline()
1753 return MPM; in buildLTODefaultPipeline()
1761 ModulePassManager MPM(DebugLogging); in buildO0DefaultPipeline() local
1766 MPM, in buildO0DefaultPipeline()
1771 C(MPM, Level); in buildO0DefaultPipeline()
1773 C(MPM, Level); in buildO0DefaultPipeline()
1781 MPM.addPass(AlwaysInlinerPass( in buildO0DefaultPipeline()
1785 MPM.addPass( in buildO0DefaultPipeline()
1793 MPM.addPass(createModuleToFunctionPassAdaptor( in buildO0DefaultPipeline()
1802 MPM.addPass(createModuleToFunctionPassAdaptor( in buildO0DefaultPipeline()
1811 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in buildO0DefaultPipeline()
1818 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); in buildO0DefaultPipeline()
1825 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in buildO0DefaultPipeline()
1829 MPM.addPass(createModuleToFunctionPassAdaptor(CoroEarlyPass())); in buildO0DefaultPipeline()
1834 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); in buildO0DefaultPipeline()
1836 MPM.addPass(createModuleToFunctionPassAdaptor(CoroCleanupPass())); in buildO0DefaultPipeline()
1840 C(MPM, Level); in buildO0DefaultPipeline()
1843 addRequiredLTOPreLinkPasses(MPM); in buildO0DefaultPipeline()
1845 return MPM; in buildO0DefaultPipeline()
2342 Error PassBuilder::parseModulePass(ModulePassManager &MPM, in parseModulePass() argument
2353 MPM.addPass(std::move(NestedMPM)); in parseModulePass()
2360 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); in parseModulePass()
2367 MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); in parseModulePass()
2374 MPM.addPass(createRepeatedPass(*Count, std::move(NestedMPM))); in parseModulePass()
2379 if (C(Name, MPM, InnerPipeline)) in parseModulePass()
2408 MPM.addPass(buildO0DefaultPipeline(L, Matches[1] == "thinlto-pre-link" || in parseModulePass()
2422 MPM.addPass(buildPerModuleDefaultPipeline(L)); in parseModulePass()
2424 MPM.addPass(buildThinLTOPreLinkDefaultPipeline(L)); in parseModulePass()
2426 MPM.addPass(buildThinLTODefaultPipeline(L, nullptr)); in parseModulePass()
2428 MPM.addPass(buildLTOPreLinkDefaultPipeline(L)); in parseModulePass()
2431 MPM.addPass(buildLTODefaultPipeline(L, nullptr)); in parseModulePass()
2439 MPM.addPass(CREATE_PASS); \ in parseModulePass()
2444 MPM.addPass( \ in parseModulePass()
2450 MPM.addPass(InvalidateAnalysisPass< \ in parseModulePass()
2456 MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(CREATE_PASS)); \ in parseModulePass()
2461 MPM.addPass(createModuleToFunctionPassAdaptor(CREATE_PASS)); \ in parseModulePass()
2469 MPM.addPass(createModuleToFunctionPassAdaptor(CREATE_PASS(Params.get()))); \ in parseModulePass()
2474 MPM.addPass( \ in parseModulePass()
2484 MPM.addPass( \ in parseModulePass()
2492 if (C(Name, MPM, InnerPipeline)) in parseModulePass()
2838 Error PassBuilder::parseModulePassPipeline(ModulePassManager &MPM, in parseModulePassPipeline() argument
2841 if (auto Err = parseModulePass(MPM, Element)) in parseModulePassPipeline()
2850 Error PassBuilder::parsePassPipeline(ModulePassManager &MPM, in parsePassPipeline() argument
2872 if (C(MPM, *Pipeline, DebugLogging)) in parsePassPipeline()
2885 if (auto Err = parseModulePassPipeline(MPM, *Pipeline)) in parsePassPipeline()