search for: runonloop

Displaying 20 results from an estimated 94 matches for "runonloop".

2008 Aug 19
2
[LLVMdev] LoopPass Question
Are LoopPasses allowed to maintain state between runOnLoop invocations? The documentation is not clear on this point. -Dave
2008 Aug 19
0
[LLVMdev] LoopPass Question
On Aug 19, 2008, at 12:32 PM, David Greene wrote: > Are LoopPasses allowed to maintain state between runOnLoop > invocations? What kind of information are you looking to maintain between runOnLoop invocations ? > > The documentation is not clear on this point. doInitialization() and doFinalization() will be run for each pass before and after runOnLoop(). For each pass doInitialization(...
2008 Aug 19
1
[LLVMdev] LoopPass Question
On Tuesday 19 August 2008 15:15, Devang Patel wrote: > On Aug 19, 2008, at 12:32 PM, David Greene wrote: > > Are LoopPasses allowed to maintain state between runOnLoop > > invocations? > > What kind of information are you looking to maintain between runOnLoop > invocations ? Cached analysis answers. > > The documentation is not clear on this point. > > doInitialization() and doFinalization() will be run for each pass > before and a...
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
...e output not reflect my changes? Index: lib/Transforms/Scalar/IndVarSimplify.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp,v retrieving revision 1.78 diff -r1.78 IndVarSimplify.cpp 310c310 < runOnLoop(*I); --- > runOnLoop(LI, *I); 322,323c322,323 < void runOnLoop(Loop *L); < void EliminatePointerRecurrence(PHINode *PN, BasicBlock *Preheader, --- > void runOnLoop(LoopInfo *LI, Loop *L); > void EliminatePointerRecurrence(LoopInfo *LI, Loop *L, PHINode *PN, B...
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)? D...
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 0x002a7...
2012 Dec 18
1
[LLVMdev] problem with runOnLoop
John Criswell <criswell <at> illinois.edu> writes: > > > 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 th...
2011 Dec 12
1
[LLVMdev] problem with runOnLoop
...2, 2011 at 7:42 PM, 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 basi...
2011 Dec 12
0
[LLVMdev] problem with runOnLoop
...mailto: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 (...
2011 Dec 12
1
[LLVMdev] problem with runOnLoop
...t;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 chan...
2005 Jul 28
0
[LLVMdev] help with pointer-to-array conversion
...> Index: lib/Transforms/Scalar/IndVarSimplify.cpp > =================================================================== > RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp,v > retrieving revision 1.78 > diff -r1.78 IndVarSimplify.cpp > 310c310 > < runOnLoop(*I); > --- >> runOnLoop(LI, *I); > 322,323c322,323 > < void runOnLoop(Loop *L); > < void EliminatePointerRecurrence(PHINode *PN, BasicBlock *Preheader, > --- >> void runOnLoop(LoopInfo *LI, Loop *L); >> void EliminatePointerRecurrence(L...
2012 Dec 13
2
[LLVMdev] LoopPass doFinalization() called multiple times per program?
I'm wondering if the documentation for LoopPass ( http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass) is misleading or incorrect (or if I'm just missing something.) The documentation states: "The doFinalization method ... is called when the pass framework has finished calling runOnLoop<http://llvm.org/docs/WritingAnLLVMPass.html#runOnLoop> for every loop in the program being compiled." >From this, I understood that for a single instance of a LoopPass sub-class, the doFinalization method would be called exactly once, after all loops had been seen. However in practic...
2012 Dec 17
3
[LLVMdev] LoopPass doFinalization() called multiple times per program?
...<http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass>) >> is misleading or >> incorrect (or if I'm just missing something.) The documentation states: >> >> "The doFinalization method ... is called when the pass framework has >> finished >> calling runOnLoop <http://llvm.org/docs/**WritingAnLLVMPass.html#** >> runOnLoop <http://llvm.org/docs/WritingAnLLVMPass.html#runOnLoop>> for >> >> every loop in the program being compiled." >> >> From this, I understood that for a single instance of a LoopPass >&gt...
2012 Dec 16
0
[LLVMdev] LoopPass doFinalization() called multiple times per program?
...g if the documentation for LoopPass > (http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass) is misleading or > incorrect (or if I'm just missing something.) The documentation states: > > "The doFinalization method ... is called when the pass framework has finished > calling runOnLoop <http://llvm.org/docs/WritingAnLLVMPass.html#runOnLoop> for > every loop in the program being compiled." > > From this, I understood that for a single instance of a LoopPass sub-class, the > doFinalization method would be called exactly once, after all loops had been > se...
2012 Dec 17
0
[LLVMdev] LoopPass doFinalization() called multiple times per program?
...;http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass>) is misleading or > incorrect (or if I'm just missing something.) The documentation states: > > "The doFinalization method ... is called when the pass framework has > finished > calling runOnLoop > <http://llvm.org/docs/__WritingAnLLVMPass.html#__runOnLoop > <http://llvm.org/docs/WritingAnLLVMPass.html#runOnLoop>> for > > every loop in the program being compiled." > > From this, I understood that for a single instance of a...
2011 May 21
4
[LLVMdev] getCanonicalInductionVariable
Hi I have the followed code for which I am writing a loop pass. int main() { int i = 0; for (i=0; i<20; i++) { printf ("hello world %d\n", i); } return 0; } In the function runOnLoop, I have the following instruction PHINode *indv = NULL; indv = L->getCanonicalInductionVariable(); However, when I check indv is always set to NULL. Since the code has a canonical induction variable, I was expecting the endv to start pointing to the induction var phi node. Please let me what I...
2013 Mar 01
2
[LLVMdev] loop metdata instruction
...ct 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 don't have access to the loop-specific functionality such...
2012 Apr 27
2
[LLVMdev] Problem in accessing Loops in other Functions Problem in accessing Loops in other Functions problem in accessing the Loops in other functions
Hi, I am using Loop pass ( runOnLoop() function ) In this function I want to access all the Loops in all the functions in the current Module the LoopInfo Pass only gives the Loops in the function where the current Loop resides :-( Is there any other Pass by which I can access the Loops in others functions as well ? ...... Regards,...
2011 Feb 28
1
[LLVMdev] LoopInfo of a basic block
...-> getLoopFor(bb): >> >> >> Two steps: >> 1) In your pass's getAnalysisUsage(), request LoopInfo. >> >> virtual void getAnalysisUsage(AnalysisUsage &AU) const { >> AU.addRequired<LoopInfo>(); >> } >> >> 2) In your runOnLoop() method get the analysis. >> >> LoopPass *LI = &getAnalysis<LoopInfo>(); >> >> Now, you can do LI->getLoopFor(...) >> >> >> To add to what Devang has said, you may find the doxygen docs on LoopInfo >> helpful: >> >> http://...
2011 Jan 06
2
[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?
...nably simple way to identify loop(s) within a function under FunctionPass? (Any existing LLVM code that I can take a look?) OR Is it possible to intermix different types of LLVM Passes? E.g. class MyPass: public FunctionPass, public LoopPass{ ... public: bool runOnFunction(...); bool runOnLoop(...); ... }; Does this make any sense? I haven't seem to find any existing LLVM pass under such uses. Thank you very much Chuck -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110106/b003904a/atta...