diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -224,11 +224,6 @@ StandardInstrumentations SI(Conf.DebugPassManager); SI.registerCallbacks(PIC); PassBuilder PB(Conf.DebugPassManager, TM, Conf.PTO, PGOOpt, &PIC); - AAManager AA; - - // Parse a custom AA pipeline if asked to. - if (auto Err = PB.parseAAPipeline(AA, "default")) - report_fatal_error("Error parsing default AA pipeline"); RegisterPassPlugins(Conf.PassPlugins, PB); @@ -243,6 +238,7 @@ TLII->disableAllFunctions(); FAM.registerPass([&] { return TargetLibraryAnalysis(*TLII); }); + AAManager AA = PB.buildDefaultAAPipeline(); // Register the AA manager first so that our version is the one used. FAM.registerPass([&] { return std::move(AA); });