search for: preservedanalyses

Displaying 20 results from an estimated 21 matches for "preservedanalyses".

2020 Jan 07
2
Let CallGraphSCCPass Use Function-Level Analysis
Dear all, I would like to use the PostDominatorTree in ArgPromotion. I did not find an example of how to use function level analysis inside CallGraphSCCPass. I tried to follow an example of how to use function-level pass in a module pass, but I hit "llvm_unreachable" in PMDataManager::addLowerLevelRequiredPass. What would be a proper way to make PostDominatorTree available in
2017 Jan 28
2
AliasAnalysis supported by the new Pass Manager in v3.9 ?
Looking at the InstructionCombining.cpp code: PreservedAnalyses InstCombinePass::run(Function &F,                                        AnalysisManager<Function> &AM) {   auto &AC = AM.getResult<AssumptionAnalysis>(F);   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);   auto &TLI = AM.getResult<TargetLibraryAnalysis&...
2020 Jun 11
4
[RFC] Pass return status
Hi folks, Per the documentation[0], whenever an LLVM pass doesn't modify the IR it's run on, it should return `false`--it's okay to return `true` if no change happen, just less optimal. In the New PM area, this is generally translated into a `PreservedAnalyses::all()`. https://reviews.llvm.org/D80916 provides an `EXPENSIVE_CHECK` that computes a hash of the IR before and after the pass, and checks that any change is correctly reported. The hash is currently incomplete (on purpose, let's start small), but it turns out a dozen of passes do not satisfy...
2020 Jan 07
2
Let CallGraphSCCPass Use Function-Level Analysis
...want to use > 'llvm::FunctionAnalysisManagerCGSCCProxy', which allows you to access > function analyses from within an CGSCC pass. Here's an example of > using it: > > ``` > class MyCGSCCPass : public llvm::PassInfoMixin<MyCGSCCPass> { > public: > llvm::PreservedAnalyses run(llvm::LazyCallGraph::SCC &C, > llvm::CGSCCAnalysisManager &AM, > llvm::LazyCallGraph &CG, > llvm::CGSCCUpdateResult &UR) { > llvm::FunctionAnalysisManager &FAM = >...
2014 Jun 18
2
[LLVMdev] PM: High-level review of the new Pass Manager (so far)
...`. - There is a new concept of an AnalysisManager (AM), which runs analyses on-demand and caches the results. - Analysis passes are split conceptually from transformation passes. - Analysis: run: (IRUnit*, AM*) -> Result - Transformation: run: (IRUnit*, AM*) -> PreservedAnalyses Note that neither of these matches the old interface, which was runOnIRUnit: IRUnit* -> bool. - PassManagers interoperate via adaptors. E.g., ModuleToFunctionPassAdaptor is a module transformation pass that contains a FunctionPassManager (with some set of function passes)....
2020 Jul 15
3
[RFC] Pass return status
...>> Per the documentation[0], whenever an LLVM pass doesn't modify the IR >> it's run on, it >> should return `false`--it's okay to return `true` if no change happen, >> just less >> optimal. In the New PM area, this is generally translated into a >> `PreservedAnalyses::all()`. >> >> https://reviews.llvm.org/D80916 provides an `EXPENSIVE_CHECK` that >> computes a >> hash of the IR before and after the pass, and checks that any change is >> correctly reported. The hash is currently incomplete (on purpose, let's >> start >...
2018 Sep 02
2
possible inconsistency in PassManagerInternal.h
Hello, (fairly new around here, apologies if the question has an obvious answer) I've been studying the structure of the new PassManager in the hopes of using it soon. After watching a couple of talks (Chandler / Sergeev), I decided to start with the Concept/Model classes in PassManagerInternal.h While I could make sense of almost everything there, two details caught my attention: 1- The
2020 Jul 16
2
[RFC] Pass return status
...cumentation[0], whenever an LLVM pass doesn't modify the IR >>> it's run on, it >>> should return `false`--it's okay to return `true` if no change happen, >>> just less >>> optimal. In the New PM area, this is generally translated into a >>> `PreservedAnalyses::all()`. >>> >>> https://reviews.llvm.org/D80916 provides an `EXPENSIVE_CHECK` that >>> computes a >>> hash of the IR before and after the pass, and checks that any change is >>> correctly reported. The hash is currently incomplete (on purpose, let's...
2020 Jul 14
3
[RFC] Introducing classes for the codegen driven by new pass manager
...that shouldn't be tied to codegen. > True. Opt and codegen pipeline could make independent progress of NPM migration. > > * Goal-1 * > https://reviews.llvm.org/D67687 > > Four member methods of a machine pass are recognized by the > machine pass manager: > (1) `PreservedAnalyses run(MachineFunction &, > MachineFunctionAnalysisManager &)`. Majority of the machine passes use > this. > (2) `Error doInitialization(Module &, > MachineFunctionAnalysisManager &)`. Passes like AsmPrinter needs a hook > to lower/transform global constructs. (invoked...
2020 Jul 11
2
[RFC] Introducing classes for the codegen driven by new pass manager
...er, if the community is convinced this work is the right design, these missing features could be added by interested parties. ** Implementation / Design Choices ** * Goal-1 * https://reviews.llvm.org/D67687 Four member methods of a machine pass are recognized by the machine pass manager: (1) `PreservedAnalyses run(MachineFunction &, MachineFunctionAnalysisManager &)`. Majority of the machine passes use this. (2) `Error doInitialization(Module &, MachineFunctionAnalysisManager &)`. Passes like AsmPrinter needs a hook to lower/transform global constructs. (invoked before all passes `run` me...
2016 Jul 25
3
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...se. My understanding is: There is nothing that prevents an analysis results from exposing a utility that transforms IR, and the result can certainly cache whether or not this transformation has been performed. > > ``` > FooTransformation.cpp<http://FooTransformation.cpp>: > > PreservedAnalyses FooTransformation::run(Function &F, AnalysisManager AM) { > // Must be called before getting analyses, as it might invalidate some. > canonicalizeIR<LCSSA>(F, AM); > > ... > } > > > include/IR/Canonicalization.h: > > template <typename Canonicalizati...
2016 Jul 26
2
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...cached. > Anyways, I don't think we have to solve this problem 100% to make progress > on the pass manager. AT no point have I felt particularly blocked on this. > > >> >> >> > >> > ``` >> > FooTransformation.cpp: >> > >> > PreservedAnalyses FooTransformation::run(Function &F, AnalysisManager >> AM) { >> > // Must be called before getting analyses, as it might invalidate >> some. >> > canonicalizeIR<LCSSA>(F, AM); >> > >> > ... >> > } >> > >> > &...
2016 Jul 15
2
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
----- Original Message ----- > From: "Mehdi Amini" <mehdi.amini at apple.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: "Sean Silva" <chisophugis at gmail.com>, "Xinliang David Li" > <davidxl at google.com>, "llvm-dev" <llvm-dev at lists.llvm.org>, "Davide > Italiano" <dccitaliano at
2016 Jul 27
0
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...te in trunk is that a module analysis can't preserve a specific function analysis. The only way that analysis invalidation can propagate downwards is by clearing the entire inner analysis manager. So I think this means that the current state in trunk is that if a function transformation returns PreservedAnalyses::none(), it will invalidate all loop analyses for all functions. (I think Chandler mentioned this issue in passing here: https://reviews.llvm.org/D21921#inline-187608) (slightly more info in my log) Anyway, for now, I'll try to do something that is as NFC as possible. Hopefully just tracking...
2016 Jul 16
3
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
On Fri, Jul 15, 2016 at 8:39 PM, Sean Silva <chisophugis at gmail.com> wrote: > It looks like there is really no sane fix within the current > infrastructure. I've had to essentially trigger invalidation (except in the > PreservedAnalyses::all() case) in the function pass manager and function to > loop adapters. > invalidation of *everything* I mean. -- Sean Silva > > So we basically need to get the analysis manager dependency tracking fixed. > > Davide and I will get measurements on the resident set impact of...
2016 Jul 29
1
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...ule > analysis can't preserve a specific function analysis. The only way that > analysis invalidation can propagate downwards is by clearing the entire > inner analysis manager. > So I think this means that the current state in trunk is that if a > function transformation returns PreservedAnalyses::none(), it will > invalidate all loop analyses for all functions. > (I think Chandler mentioned this issue in passing here: > https://reviews.llvm.org/D21921#inline-187608) > > (slightly more info in my log) > > Anyway, for now, I'll try to do something that is as NFC as p...
2020 Jul 14
4
[RFC] Introducing classes for the codegen driven by new pass manager
...nt progress of NPM >> migration. >> >> > >> > * Goal-1 * >> > https://reviews.llvm.org/D67687 >> > >> > Four member methods of a machine pass are recognized by the >> > machine pass manager: >> > (1) `PreservedAnalyses run(MachineFunction &, >> > MachineFunctionAnalysisManager &)`. Majority of the machine passes use >> > this. >> > (2) `Error doInitialization(Module &, >> > MachineFunctionAnalysisManager &)`. Passes like AsmPrinter needs a hook >> &g...
2016 Jul 22
4
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...>> >> On Fri, Jul 15, 2016 at 8:39 PM, Sean Silva <chisophugis at gmail.com> >> wrote: >> >>> It looks like there is really no sane fix within the current >>> infrastructure. I've had to essentially trigger invalidation (except in the >>> PreservedAnalyses::all() case) in the function pass manager and function to >>> loop adapters. >>> >> >> invalidation of *everything* I mean. >> >> -- Sean Silva >> >> >>> >>> So we basically need to get the analysis manager dependency tracking...
2016 Jul 25
2
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
..., 2016 at 8:39 PM, Sean Silva < chisophugis at gmail.com > > > > > wrote: > > > > It looks like there is really no sane fix within the current > > > infrastructure. I've had to essentially trigger invalidation > > > (except > > > in the PreservedAnalyses::all() case) in the function pass > > > manager > > > and function to loop adapters. > > > > > invalidation of *everything* I mean. > > > -- Sean Silva > > > > So we basically need to get the analysis manager dependency > > > trac...
2016 Jul 26
3
[PM] I think that the new PM needs to learn about inter-analysis dependencies...
...t 8:39 PM, Sean Silva <chisophugis at gmail.com> >>>> wrote: >>>> >>>>> It looks like there is really no sane fix within the current >>>>> infrastructure. I've had to essentially trigger invalidation (except in the >>>>> PreservedAnalyses::all() case) in the function pass manager and function to >>>>> loop adapters. >>>>> >>>> >>>> invalidation of *everything* I mean. >>>> >>>> -- Sean Silva >>>> >>>> >>>>> >>&g...