[PATCH] D144860: [LoopPredication][NFC] Preserve DT and loop analyzes
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 20:07:52 PST 2023
mkazantsev added a comment.
Is it? I was reading LICM code and it's like
PreservedAnalyses LICMPass::run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR, LPMUpdater &) {
if (!AR.MSSA)
report_fatal_error("LICM requires MemorySSA (loop-mssa)",
/*GenCrashDiag*/false);
// For the new PM, we also can't use OptimizationRemarkEmitter as an analysis
// pass. Function analyses need to be preserved across loop transformations
// but ORE cannot be preserved (see comment before the pass definition).
OptimizationRemarkEmitter ORE(L.getHeader()->getParent());
LoopInvariantCodeMotion LICM(Opts.MssaOptCap, Opts.MssaNoAccForPromotionCap,
Opts.AllowSpeculation);
if (!LICM.runOnLoop(&L, &AR.AA, &AR.LI, &AR.DT, &AR.AC, &AR.TLI, &AR.TTI,
&AR.SE, AR.MSSA, &ORE))
return PreservedAnalyses::all();
auto PA = getLoopPassPreservedAnalyses();
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LoopAnalysis>();
PA.preserve<MemorySSAAnalysis>();
return PA;
}
Should we then remove it from there?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144860/new/
https://reviews.llvm.org/D144860
More information about the llvm-commits
mailing list