search for: lppassmanag

Displaying 20 results from an estimated 84 matches for "lppassmanag".

Did you mean: lppassmanager
2011 May 09
2
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
Hi, I try to write a FunctionPass that, among other tasks, has to clone some loops from the current function. How can I obtain the LPPassManager in order to use the CloneLoop function. In a LoopPass this is a parameter for the runOnLoop, but how can I obtain it in a FunctionPass? I tried simply by creating a new instance : ValueMap<const Value *, Value* > VMap; LoopInfo *LI = &getAnalysis<LoopInfo>();...
2011 May 09
0
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
On Mon, May 9, 2011 at 1:06 AM, Jimborean Alexandra <xinfinity_a at yahoo.com> wrote: > Hi, > > I try to write a FunctionPass that, among other tasks, has to clone some > loops from the current function. > How can I obtain the LPPassManager in order to use the CloneLoop function. > In a LoopPass this is a parameter for the runOnLoop, but how can I obtain it > in a FunctionPass? > I tried simply by creating a new instance : > >         ValueMap<const Value *, Value* > VMap; >         LoopInfo *LI = &getAna...
2011 Jun 15
2
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
Thanks , your suggestion was welcome and CloneLoop works without passing the LPPassManager. However, I reached another problem. When the loop to be cloned has some subloops, the subloops are not properly cloned. Some clones of the clones are created and the CFG between the cloned basic blocks of the subloops is not correctly built. There are clones like for.body.clone, for....
2016 Oct 14
2
LCSSA verification for the top-level loops
Hi Michael, +CC llvm-dev My guess is that it would be rather error prone to pinpoint exact places where we start populating new LPPassManager since it’s created lazily via LoopPass::assignPassManager. So we are risking to miss adding verifiers in some of the LPPassManager’s. One similar idea is to introduce LCSSAVerifier function pass and make LCSSA pass to be dependant on it. That will allow me to check ‘getAnalysisIfAvaliable<LCS...
2016 Oct 17
2
LCSSA verification for the top-level loops
...On Oct 14, 2016, at 9:54 AM, Igor Laevsky <igor at azulsystems.com> wrote: >> >> Hi Michael, > Hi Igor, Hi Michael, > >> >> +CC llvm-dev >> >> My guess is that it would be rather error prone to pinpoint exact places where we start populating new LPPassManager since it’s created lazily via LoopPass::assignPassManager. So we are risking to miss adding verifiers in some of the LPPassManager’s. > That’s true, I didn’t particularly like that either, but suggested as a potential workaround. >> >> One similar idea is to introduce LCSSAVerifie...
2011 Jun 15
0
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
On Wed, Jun 15, 2011 at 3:20 AM, Jimborean Alexandra <xinfinity_a at yahoo.com> wrote: > Thanks , your suggestion was welcome and CloneLoop works without passing the > LPPassManager. > >  However, I reached another problem. When the loop to be cloned has some > subloops, the subloops are not properly cloned. Some clones of the clones > are created and the CFG between the cloned basic blocks of the subloops is > not correctly built. There are clones like for.bo...
2011 Dec 12
4
[LLVMdev] problem with runOnLoop
hi all, I want access to all basic blocks of function in a loop, so I used the following code: *bool parallel::runOnLoop(Loop *L, LPPassManager &LPM) { for (Function::iterator bi= func->begin(); bi != func->end(); bi++){ // } }* First loop run without problem, but for second loop I get the following error: *0 libLLVM-2.9.so 0x0137d530 1 libLLVM-2.9.so 0x0137fa6c 2 0x002a7400 __kernel_sigretur...
2016 Oct 19
2
LCSSA verification for the top-level loops
...tems.com<mailto:igor at azulsystems.com>> wrote: On Oct 14, 2016, at 9:54 AM, Igor Laevsky <igor at azulsystems.com<mailto:igor at azulsystems.com>> wrote: Hi Michael, Hi Igor, Hi Michael, Hi Michael, What I was referring to is that we can write something like this inside LPPassManager iteration: if (getAnalaysisIfAvaliable<LCSSAVerifier>()) { CurrentLoop->verifyLCSSA(); ) This will have less impact but feels a bit wrong. Originally I didn’t like this idea, but the more I think about it the more I like it. Currently all loop passes use (or should use) getLoopAnalysisU...
2009 Feb 16
1
[LLVMdev] loop passes vs call graph
...-loop-unswitch on G > run -loop-unswitch on F. This will defeat the goal of applying loop transformations before inlining leaf functions. Note, Loop transformations are not aware of call graph. They do not claim to preserve call graph. However, loop passes are run by a loop pass manager (LPPassManager) which is itself a function pass. The pass manager is not doing the right thing here because LPPassManager is incorrectly claiming to preserve call graph. The right approach is to teach LPPassManager to really preserve call graph. - Devang > > > Just my opinion of course. > &...
2011 Dec 12
1
[LLVMdev] problem with runOnLoop
...John Criswell <criswell at illinois.edu>wrote: > >> On 12/12/11 9:59 AM, neda 8664 wrote: >> >> hi all, >> >> I want access to all basic blocks of function in a loop, so I used the >> following code: >> >> *bool parallel::runOnLoop(Loop *L, LPPassManager &LPM) >> { >> for (Function::iterator bi= func->begin(); bi != func->end(); bi++){ >> // >> } >> }* >> >> >> Are you modifying anything within this code (especially changes that >> add/remove basic blocks or change th...
2011 Jun 16
1
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
Hi Eli, > I would like to point you to a code example, but then I realized > nothing in the LLVM codebase actually uses CloneLoop. So I'm not > surprised it's broken... sorry about that. maybe CloneLoop should be removed then? Ciao, Duncan.
2011 Dec 12
1
[LLVMdev] problem with runOnLoop
...ois.edu>wrote: >> >>> On 12/12/11 9:59 AM, neda 8664 wrote: >>> >>> hi all, >>> >>> I want access to all basic blocks of function in a loop, so I used the >>> following code: >>> >>> *bool parallel::runOnLoop(Loop *L, LPPassManager &LPM) >>> { >>> for (Function::iterator bi= func->begin(); bi != func->end(); bi++){ >>> // >>> } >>> }* >>> >>> >>> Are you modifying anything within this code (especially changes that >>>...
2011 Dec 12
0
[LLVMdev] problem with runOnLoop
...illinois.edu>> wrote: > > On 12/12/11 9:59 AM, neda 8664 wrote: >> hi all, >> >> I want access to all basic blocks of function in a loop, so I >> used the following code: >> >> /bool parallel::runOnLoop(Loop *L, LPPassManager &LPM) >> { >> for (Function::iterator bi= func->begin(); bi != >> func->end(); bi++){ >> // >> } >> }/ > > Are you modifying anything within this code (especially >...
2011 Dec 12
0
[LLVMdev] problem with runOnLoop
On 12/12/11 9:59 AM, neda 8664 wrote: > hi all, > > I want access to all basic blocks of function in a loop, so I used the > following code: > > /bool parallel::runOnLoop(Loop *L, LPPassManager &LPM) > { > for (Function::iterator bi= func->begin(); bi != func->end(); bi++){ > // > } > }/ Are you modifying anything within this code (especially changes that add/remove basic blocks or change their Terminator instructions)? Depending on what you&...
2012 Jan 03
1
[LLVMdev] AliasAnalysis and memory dependency
...b3063 6 opt 0x082b7cad llvm::AliasAnalysis::getModRefInfo(llvm::ImmutableCallSite, llvm::ImmutableCallSite) + 61 7 opt 0x082b22e4 8 parallel.so 0x04a5c7c6 parallel::buildDataGraph(llvm::Loop*) + 1542 9 parallel.so 0x04a54e24 parallel::runOnLoop(llvm::Loop*, llvm::LPPassManager&) + 452 10 opt 0x0831a124 llvm::LPPassManager::runOnFunction(llvm::Function&) + 1156 11 opt 0x084c3aa1 llvm::FPPassManager::runOnFunction(llvm::Function&) + 545 12 opt 0x084c3bb7 llvm::FPPassManager::runOnModule(llvm::Module&) + 87 13 opt...
2012 Jun 05
2
[LLVMdev] How to unroll loops in opposite loop nest order
...issing optimization opportunities in my case. I haven't found a way how to implement this on my own. I tried implementing a function pass, where I could process the loops outside in. Unfortunately I cannot use the UnrollLoop utility function in this case, which crashes, when called with a NULL LPPassManager object, despite opposite documentation. Is there any way how to process loops outside in still using the UnrollLoop function? Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120605/8d943358/attach...
2013 Mar 01
2
[LLVMdev] loop metdata instruction
Hi I'm working on a project which needs loop-attached metadata similar to the parallel metadata discussed in here. Currently I'm trying to make the metadata get through the optimisation passes unscathed. For loop passes, I've solved that by modifying the LPPassManager to check for metadata presence before and after runOnLoop, and restoring it if necessary (assuming the loop didn't get removed and the metadata didn't get moved). However, the CFG simplifier pass also can optimize the loop latch and attached metadata away. As this is a function pass, I d...
2008 Aug 11
2
[LLVMdev] Applying different Optimizations for different Functions - Questions?
...BBFuncs::runOnModule(Module &M) { Function *Main = M.getFunction("main"); if (Main == 0) { cerr << "!!! No Main Function" << std::endl; return false; } //Determine each Function LoopPass * UnrollLoops; FunctionPass *DeadStoreElim; LPPassManager *LPPM; Function *CurFunc1 = M.getFunction("NewFunction1"); Function &Current1 = (*CurFunc1); Function *CurFunc2 = M.getFunction("NewFunction2"); Function &Current2 = (*CurFunc2); cerr << "Dead Store Eliminations" << std::endl; DeadSt...
2012 Jun 05
0
[LLVMdev] How to unroll loops in opposite loop nest order
...pportunities in my case. > > I haven't found a way how to implement this on my own. I tried implementing a function pass, where I could process the > loops outside in. Unfortunately I cannot use the UnrollLoop utility function in this case, which crashes, when called with a > NULL LPPassManager object, despite opposite documentation. > > Is there any way how to process loops outside in still using the UnrollLoop function? I noticed another case of referencing LPM without a null check and fixed it here r158007. You'll should be careful to check everything that's current...
2012 Feb 08
2
[LLVMdev] Crash/Assert on -loop-reduce
...ibc.so.6 0x00007fdb2f343ab6 abort + 390 5 libc.so.6 0x00007fdb2f3387c5 __assert_fail + 245 6 opt 0x000000000051a9a6 7 opt 0x000000000051979e 8 opt 0x0000000000503863 9 opt 0x000000000050102e 10 opt 0x0000000000689184 llvm::LPPassManager::runOnFunction(llvm::Function&) + 836 11 opt 0x0000000000801f9f llvm::FPPassManager::runOnFunction(llvm::Function&) + 351 12 opt 0x000000000080221b llvm::FPPassManager::runOnModule(llvm::Module&) + 59 13 opt 0x000000000080236a llvm::MPPassManager::r...