search for: moduleanalysismanager

Displaying 12 results from an estimated 12 matches for "moduleanalysismanager".

2018 Jul 21
2
Registering passes on a module
...es with the PassBuilder to optimize the result of MCJIT (I assume, this is a requirement for performance). So I do this: llvm::PassBuilder passBuilder; llvm::ModulePassManager modulePassManager = passBuilder.buildPerModuleDefaultPipeline(llvm::PassBuilder::OptimizationLevel::O3); llvm::ModuleAnalysisManager moduleAnalysisManager; passBuilder.registerModuleAnalyses(moduleAnalysisManager); modulePassManager.run(*module, moduleAnalysisManager); with module being a pointer to an LLVM module. Unfortunately, the moduleAnalysisManager has only the module passes, but not the function ones that are wr...
2019 Mar 13
1
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
On 3/14/19 2:04 AM, Hiroshi Yamauchi wrote: > > > On Wed, Mar 13, 2019 at 2:37 PM Fedor Sergeev <fedor.sergeev at azul.com > <mailto:fedor.sergeev at azul.com>> wrote: > >> >> - Add a new proxy ModuleAnalysisManagerLoopProxy for a loop pass >> to be able to get to the ModuleAnalysisManager in one step and >> PSI through it. > This is just an optimization of compile-time, saves one > indirection through FunctionAnalysisManager. > I'm not even sure if it is worth the...
2019 Mar 13
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
...e each non-module pass that needs it. > PSI can be technically invalidated but unlikely as PSI is immutable. > If it does, we can insert another RequireAnalysisPass. ProfileSummaryInfo::invalidate always return false, so it does not need any extra handling (as soon as it finds its way into ModuleAnalysisManager). > > - If PGO, conditionally request BFI from the passes that need it. For > (pipelined) loop passes, we need to insert a pass that computes BFI > conditionally (if PGO) in front of them and make them preserve BFI > through. This is to avoid pipeline interruptions and potential...
2020 Jan 24
3
Module::createRNG() and new PassManager
Correct me if I'm wrong, but is Module::CreateRNG(Pass *) unusable with the new PassManager? Since each pass is defined as a llvm::PassInfoMixIn<DerivedT> instead of inheriting from llvm::Pass, it doesn't seem possible to obtain the underlying llvm::Pass * from e.g. llvm::ModuleAnalysisManager. Would it make sense to change the definition/implementation to Module::CreateRNG(StringRef PassName)? Please CC me on responses. Thanks, Dominic
2019 Feb 27
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
...s through analysis managers [1] and that we might unnecessarily running some analyses unless we conditionally build pass pipelines for PGO cases. It seems that for different types of passes to be able to get PSI and BFI, we’d need to ensure PSI is cached for a non-module pass, and PSI, BFI and the ModuleAnalysisManager proxy are cached for a loop pass in the pass pipelines. This may mean potentially needing to insert BFI/PSI in front of many passes [2]. It seems not obvious how to conditionally insert BFI for PGO pipelines because there isn’t always a good flag to detect PGO cases [3] or we tend to build pass pip...
2019 Mar 04
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
...regards, >   Fedor. > >> >>> It seems that for different types of passes to be able >>> to get PSI and BFI, we’d need to ensure PSI is cached >>> for a non-module pass, and PSI, BFI and the >>> ModuleAnalysisManager proxy are cached for a loop pass >>> in the pass pipelines. This may mean potentially needing >>> to insert BFI/PSI in front of many passes [2]. It seems >>> not obvious how to conditionally insert BFI for PGO >>> p...
2019 Mar 04
2
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
...interface would be. > Hm, sounds non-trivial :) noting BFI depends on BPI. > regards, > Fedor. > > >> It seems that for different types of passes to be able to get PSI and >> BFI, we’d need to ensure PSI is cached for a non-module pass, and PSI, BFI >> and the ModuleAnalysisManager proxy are cached for a loop pass in the pass >> pipelines. This may mean potentially needing to insert BFI/PSI in front of >> many passes [2]. It seems not obvious how to conditionally insert BFI for >> PGO pipelines because there isn’t always a good flag to detect PGO cases >&...
2019 Jul 22
2
Run llvm pass from standalone project
Hi all, I am trying to use LLVM's AliasAnalysis pass, but from a standalone tool that uses llvm libraries. The following is the code snippet I am currently using. PassBuilder PB; auto mod_manager = ModuleAnalysisManager { }; PB.registerModuleAnalyses(mod_manager); AAResults& AAR = mod_manager.getResult<AAManager>(*M); But the code fails at .getResult with the following error: /llvm/include/llvm/IR/PassManager.h:778: typename PassT::Result& llvm::AnalysisManager<IRUnitT, ExtraArgTs>::getResult(...
2019 Mar 01
4
RFC: Getting ProfileSummaryInfo and BlockFrequencyInfo from various types of passes under the new pass manager
...d into the pipelines (via flags)? I wonder how hard it'd be to teach all the relevant loop passes to preserve BFI (or BPI).. > It seems that for different types of passes to be able to get PSI and BFI, > we’d need to ensure PSI is cached for a non-module pass, and PSI, BFI and > the ModuleAnalysisManager proxy are cached for a loop pass in the pass > pipelines. This may mean potentially needing to insert BFI/PSI in front of > many passes [2]. It seems not obvious how to conditionally insert BFI for > PGO pipelines because there isn’t always a good flag to detect PGO cases > [3] or we te...
2018 Aug 21
2
Function optimization pass
Hi Philip, Thanks for the response. Under llvm-5.0.2 and llvm-6.0.1 in Debug mode, the crash hit at the same assertion: /usr/local/include/llvm/IR/PassManager.h:689: typename PassT::Result& llvm::AnalysisManager<IRUnitT, ExtraArgTs>::getResult(IRUnitT&, ExtraArgTs ...) [with PassT = llvm::InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::Loop,
2014 Jun 18
2
[LLVMdev] PM: High-level review of the new Pass Manager (so far)
...Concept requires a `name()` for passes. Why don't AnalysisPassConcept and AnalysisResultConcept? 2. AnalysisManagerBase defines two versions of `invalidate()` -- one of which takes a `Module*` (instead of `IRUnitT`). It's not clear to me why the analysis managers (other than ModuleAnalysisManager) need this. What am I missing? 3. The number of lines of code to enable transformation pass managers (and analysis managers) to interoperate seems to scale quadratically in the number of types of IRUnit. Am I reading this wrong? Is there a plan to manage that, or is it an open...
2018 Jun 07
2
RFC: Pass Execution Instrumentation interface
On 06/07/2018 06:11 PM, Chandler Carruth wrote: > We had already talked about this, so unsurprisingly I'm generally in > favor of the direction. Some comments below. > > On Thu, Jun 7, 2018 at 2:00 AM Fedor Sergeev <fedor.sergeev at azul.com > <mailto:fedor.sergeev at azul.com>> wrote: > >    - access through LLVM Context (allows to control life-time and