search for: passbuilder

Displaying 20 results from an estimated 67 matches for "passbuilder".

2018 Jul 21
2
Registering passes on a module
Hi all, I'm trying to build passes 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 m...
2018 Sep 25
2
Porting Pass to New PassManager
Frontends _are_ using PassBuilder, but they need to hook into the default pipeline creation to insert the sanitizer passes. On Tue, Sep 25, 2018 at 12:15 PM Fedor Sergeev <fedor.sergeev at azul.com> wrote: > Hmm... frontends should be using PassBuilder anyway. > And if they are using PassBuilder then they are using Pa...
2019 Jul 30
2
LLVM Build Error: Target object too big
While trying to assemble a particular input file, my build system failed because the target object was too big. I calculated that the input source file after preprocessing would be about 3.91Mb. system: CYGWIN_NT-10.0 x86_64 Cygwin file: llvm-master/lib/Passes/PassBuilder.cpp build output: Scanning dependencies of target LLVMPasses [ 84%] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/as: CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o: too many sections (55165)...
2018 Aug 21
2
Function optimization pass
...for any help. Le mar. 21 août 2018 à 14:00, Philip Pfaffe <philip.pfaffe at gmail.com> a écrit : > Can you tell us more about the crash? I.e., do you have a stack dump? Does > it hit an assertion (if your LLVM is built in Debug mode/has assertions > enabled)? > > Generally, PassBuilder and passes likely assume a full stack of analysis > managers. You should thus create and populate all of them, not just > FunctionAM, and cross-register their proxies. > > Cheers, > Philip > > On Mon, Aug 20, 2018 at 7:29 PM Ta Thanh Dinh via llvm-dev < > llvm-dev at list...
2019 Sep 04
2
Memory Requirements For Compiling PassBuilder.cpp
Hi Everyone, Recently I have realised that compiling the file PassBuilder.cpp takes a significant amount of memory. I have seen anywhere between 700 MB to over 1GB depending on which build compiler is used. This memory consumption recently caused a couple of build bots that run on a smaller machine to run out of memory and fail to build. I have no intention of chang...
2018 Apr 18
2
LLVM Pass Managers
...p Pfaffe <philip.pfaffe at gmail.com> wrote: > Hi Son, > > I have an answer to your first question: > > 1, What are the differences between *LegacyPassManager* and *PassManager*? >> I see that *opt* uses the former most of the times while the latter is >> used via *PassBuilder* API when an user wants to build her own pipeline, >> but I have no idea why so. What to use and when to use it is not clear to >> me. >> > PassManager is the result of a long going effort to replace the default > pass manager of opt and clang. Here's the original RFC co...
2018 Sep 25
2
Porting Pass to New PassManager
Hi Leonard, Fedor, while it's true that RegisterPass is not applicable for new-pm passes, PassRegistry.def is not the whole story. Passes in PassRegistry are available for the opt tool. The sanitizers are passes that usually get added to the pipeline by the frontend. There, you need to use PassBuilder's callbacks mechanism to hook the sanitizer into the optimizer. Assuming you're willing to contribute your changes, please share your progress! Thank you for making a move on this! Cheers, Philip On Tue, Sep 25, 2018 at 8:27 AM Fedor Sergeev via llvm-dev < llvm-dev at lists.llvm.org&g...
2018 Aug 20
2
Function optimization pass
...function in a module, what I have done is: mod = ...load module from LLVM IR bitcode file go_back.bc... auto lift_func = mod->getFunction("go_back"); if (not lift_func) {     llvm::errs() << "Error: cannot get function\n";     return 0; } auto pass_builder = llvm::PassBuilder{}; auto fa_manager = llvm::FunctionAnalysisManager{}; pass_builder.registerFunctionAnalyses(fa_manager); auto fp_manager = pass_builder.buildFunctionSimplificationPipeline(llvm::PassBuilder::OptimizationLevel::O2); fp_manager.run(*lift_func, fa_manager); ...print mod... but the program crashe...
2018 Oct 01
3
OptBisect implementation for new pass manager
...y to pass runtime information (such as the > target) during pass registration. The registration logic is for sure baked into the sources :) And we are completely in control of how we do the PassRegistry.def registration. At run-time we have a bunch of objects involved into the registration:   PassBuilder   OptBisect   pass object to be registered We can make their interaction to be as complex as needed. Say, it is easy to extend PassInstrumentation interface to cover the registration time and have PassBuilder invoke corresponding instrumentations, leading to OptBisect being able to act upon a...
2018 Apr 19
0
LLVM Pass Managers
Hi Son, PassManagerBuilder is used to populate legacy PassManagers. That role is taken over by PassBuilder for new-PM passes. Cheers, Philip 2018-04-18 13:40 GMT+02:00 Son Tuan VU <sontuan.vu119 at gmail.com>: > Hi Philip, > > Thank you for your reply. So what would be the right way/API to write > out-of-tree pass? I've been using *PassManagerBuilder*, which requires a > call...
2018 Apr 20
2
LLVM Pass Managers
...Vedant: what do you think about the last point, since Debugify is also related? Son Tuan Vu On Thu, Apr 19, 2018 at 6:14 PM, Philip Pfaffe <philip.pfaffe at gmail.com> wrote: > Hi Son, > > PassManagerBuilder is used to populate legacy PassManagers. That role is > taken over by PassBuilder for new-PM passes. > > Cheers, > Philip > > 2018-04-18 13:40 GMT+02:00 Son Tuan VU <sontuan.vu119 at gmail.com>: > >> Hi Philip, >> >> Thank you for your reply. So what would be the right way/API to write >> out-of-tree pass? I've been using *Pass...
2018 Oct 01
2
OptBisect implementation for new pass manager
...I'm not sure that I fully gather which part of pipeline construction/execution and which object interaction do you mean when talking about "query hooks" or "run the pass". Right now we have the following objects:    - OptBisect, which is pass-instrumentation object    - PassBuilder object that constructs the pipeline    - PassManager object that controls the pass execution    - Pass object, which is being constructed for PassBuilder and then executed with PassManager At construction time there are:   Pass, OptBisect, PassBuilder objects and at execution time there are:...
2018 Apr 17
2
LLVM Pass Managers
Hello all, I have 2 separate questions: 1, What are the differences between *LegacyPassManager* and *PassManager*? I see that *opt* uses the former most of the times while the latter is used via *PassBuilder* API when an user wants to build her own pipeline, but I have no idea why so. What to use and when to use it is not clear to me. 2, I've asked this question once but have had no answer, so I'm gonna revive it here: in *opt*, the *verify-each* mode is only activated when we provide a pass n...
2018 Jun 07
2
RFC: Pass Execution Instrumentation interface
...In my implementation (linked at the end of RFC) I'm using PassInstrumentationImpl to have a single copy of object. What entity should *own* PassInstrumentationImpl object to make it unique per-compilation? Again, in my implementation with Analysis-managed PassInstrumentation I put Impl into PassBuilder which registers Analyses with a reference to its Impl. However that makes Impl to be per-Builder unique, which is not the same as per-compilation. > > Because this is very pass specific, I think it would be substantially > cleaner for it to be more specifically based in the pass infrast...
2014 Sep 11
3
[LLVMdev] patch for DragonEgg 3.3
Hi - attached is a patch to enable building DragonEgg (x86_64) for LLVM3.3 and LLVM3.4. That is, add these changes to the 3.3 release, and it becomes possible to build DragonEgg against a llvm3.4 compiler. Regards, Richard Gorton Cognitive Electronics rcgorton at cog-e.com ---------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name:
2018 Apr 20
2
LLVM Pass Managers
...gt; > best, > vedant > > > > Son Tuan Vu > > On Thu, Apr 19, 2018 at 6:14 PM, Philip Pfaffe <philip.pfaffe at gmail.com> > wrote: > >> Hi Son, >> >> PassManagerBuilder is used to populate legacy PassManagers. That role is >> taken over by PassBuilder for new-PM passes. >> >> Cheers, >> Philip >> >> 2018-04-18 13:40 GMT+02:00 Son Tuan VU <sontuan.vu119 at gmail.com>: >> >>> Hi Philip, >>> >>> Thank you for your reply. So what would be the right way/API to write >>> out...
2018 Apr 17
0
LLVM Pass Managers
Hi Son, I have an answer to your first question: 1, What are the differences between *LegacyPassManager* and *PassManager*? > I see that *opt* uses the former most of the times while the latter is > used via *PassBuilder* API when an user wants to build her own pipeline, > but I have no idea why so. What to use and when to use it is not clear to > me. > PassManager is the result of a long going effort to replace the default pass manager of opt and clang. Here's the original RFC containing the motivatio...
2018 Apr 20
0
LLVM Pass Managers
...quot;. best, vedant > > Son Tuan Vu > > On Thu, Apr 19, 2018 at 6:14 PM, Philip Pfaffe <philip.pfaffe at gmail.com <mailto:philip.pfaffe at gmail.com>> wrote: > Hi Son, > > PassManagerBuilder is used to populate legacy PassManagers. That role is taken over by PassBuilder for new-PM passes. > > Cheers, > Philip > > 2018-04-18 13:40 GMT+02:00 Son Tuan VU <sontuan.vu119 at gmail.com <mailto:sontuan.vu119 at gmail.com>>: > Hi Philip, > > Thank you for your reply. So what would be the right way/API to write out-of-tree pass? I'...
2018 Sep 27
2
Porting Pass to New PassManager
..., but feel like this should still work even if > AddressSanitizer is added in the new PM and AddressSanitizerModule is > added in legacy. > > - Leo > On Tue, Sep 25, 2018 at 4:09 AM Philip Pfaffe <philip.pfaffe at gmail.com> > wrote: > > > > Frontends _are_ using PassBuilder, but they need to hook into the > default pipeline creation to insert the sanitizer passes. > > > > On Tue, Sep 25, 2018 at 12:15 PM Fedor Sergeev <fedor.sergeev at azul.com> > wrote: > >> > >> Hmm... frontends should be using PassBuilder anyway. > >&...
2018 Apr 20
0
LLVM Pass Managers
...gt; >> Son Tuan Vu >> >> On Thu, Apr 19, 2018 at 6:14 PM, Philip Pfaffe <philip.pfaffe at gmail.com <mailto:philip.pfaffe at gmail.com>> wrote: >> Hi Son, >> >> PassManagerBuilder is used to populate legacy PassManagers. That role is taken over by PassBuilder for new-PM passes. >> >> Cheers, >> Philip >> >> 2018-04-18 13:40 GMT+02:00 Son Tuan VU <sontuan.vu119 at gmail.com <mailto:sontuan.vu119 at gmail.com>>: >> Hi Philip, >> >> Thank you for your reply. So what would be the right way/API t...