[PATCH] D98103: [NPM] Do not run function simplification pipeline unnecessarily
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 14 15:11:54 PDT 2021
mtrofin marked an inline comment as done.
mtrofin added inline comments.
================
Comment at: llvm/lib/Analysis/CGSCCPassManager.cpp:906
+
+ if (InvalidateSA)
+ FAM.invalidate<FunctionStatusAnalysis>(N.getFunction());
----------------
aeubanks wrote:
> mtrofin wrote:
> > aeubanks wrote:
> > > mtrofin wrote:
> > > > aeubanks wrote:
> > > > > can this be `!FunctionPass`?
> > > > then we wouldn't invalidate when updateCGAndAnalysisManagerForFunctionPass is called. CoroSplit calls it, for instance.
> > > I feel like I'm missing something obvious, why is this invalidate here necessary? Can we just see what the passes invalidate?
> > When passes call into here, I we can assume FunctionStatusAnalysis can be invalidated because something changed.
> >
> > But this is also entered from line 596, which happens after the function simplification pipeline finishes. The last thing that the pipeline does is it caches a FunctionStatusAnalysis::Result. Well, so next thing that would happen is we'd yank it here - unless we indicate this is the one case we don't want that to happen.
> How would it be yanked? The RequireAnalysis pass after the function simplification pipeline preserves all analyses.
> Removing these two lines and running check-llvm still passes.
Well, removing these 2 lines then doesn't invalidate FunctionAnalysisStatus ever :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98103/new/
https://reviews.llvm.org/D98103
More information about the llvm-commits
mailing list