similar to: [LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?"

2011 Jan 06
0
[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?
On Jan 6, 2011, at 9:21 AM, Chuck Zhao wrote: > LLVMers, > > I have a traversal plan which needs to visit certain types of Functions. For each instruction in such functions, I will need to know: > 1. is it located inside a loop > 2. if yes, what level of loop nest it is currently in. > > So on the highest level, it should be a FunctionPass. However, in order to identify
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, Shanmukha Rao -------------- next part -------------- An HTML
2011 Feb 28
1
[LLVMdev] LoopInfo of a basic block
On Mon, Feb 28, 2011 at 6:04 PM, Naznin Fauzia <laboni14 at gmail.com> wrote: > Thanks Devang and John. My pass is actually a loop pass, not a function > pass. So, I couldnt override the getAnalysisUsage. > A LoopPass is no different from a FunctionPass here. You can use getAnalysisUsage and getAnalysis in a LoopPass. > I am in a loop pass, I know the outermost loop. Now How
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;
2011 Feb 28
2
[LLVMdev] LoopInfo of a basic block
On 2/28/11 4:43 PM, Devang Patel wrote: > > On Feb 28, 2011, at 2:35 PM, Naznin Fauzia wrote: > >> Hi all, >> >> How Can I get the Loops around an Instruction? >> >> I know I can get the basic block of an instruction using >> inst.getParent() which returns a BasicBlock*. Now I want to use the >> getLoopFor(BasicBlock) method of the class
2011 Sep 12
1
[LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
Hi Tim, > From: Tim Creech <tcreech at umd.edu> > Subject: [LLVMdev] IVUsers (LoopPass) analysis in a ModulePass? > Date: September 1, 2011 11:46:28 AM PDT > To: llvmdev at cs.uiuc.edu > > Hi all, > I have a loadable ModulePass which does transformations, and I would like to > use IVUsers analysis within it. I noticed when I try to do this (via > the usual
2012 Apr 27
0
[LLVMdev] Problem in accessing Loops in other Functions Problem in accessing Loops in other Functions problem in accessing the Loops in other functions
On 4/27/12 2:05 PM, shanmuk rao wrote: > 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
2011 Feb 28
0
[LLVMdev] LoopInfo of a basic block
Thanks Devang and John. My pass is actually a loop pass, not a function pass. So, I couldnt override the getAnalysisUsage. I am in a loop pass, I know the outermost loop. Now How can I get the loopInfo from here? I couldn't find helpful methods in the LoopInfo class documents. On Mon, Feb 28, 2011 at 5:52 PM, John Criswell <criswell at illinois.edu>wrote: > On 2/28/11 4:43 PM,
2012 Jul 13
4
[LLVMdev] adding new data types to llvm
Hello . I would like to add new custom data type to llvm C parser, I use LLVM/Clang version 3.1. Adding new type instructions from llvm.org site are out of date (http://llvm.org/docs/ExtendingLLVM.html#type). Could you please provide me with guidance? Thanks in advance, Edvard  -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Apr 23
2
[LLVMdev] The &quot;scope&quot; of passes
> Personally, I would make everything a FunctionPass.   What if a FunctionPass requires the results of a LoopPass? Is there a way to get all loops of a function without using LoopPass and LoopInfo?
2010 Apr 24
2
[LLVMdev] The &quot;scope&quot; of passes
But is there a better way of getting the loops in a function than using LoopInfo? For some tasks it is necessary that we don't process the same loop twice. Doing that with LoopInfo requires the use of a flag. On Fri, Apr 23, 2010 at 12:41 PM, Devang Patel <devang.patel at gmail.com>wrote: > On Thu, Apr 22, 2010 at 11:50 PM, Arjun <arjunsingri at gmail.com> wrote: > >>
2012 Jul 23
0
[LLVMdev] llvm::LoopPass
Hello . I'm trying to implement LoopPass. Here is simple code :    class LoopParser: public llvm::LoopPass   {     public:       static char ID;     public:       virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const       {         AU.addRequiredID(llvm::LoopSimplifyID);         AU.addPreservedID(llvm::LoopSimplifyID);         AU.addRequired<llvm::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
2010 Apr 23
0
[LLVMdev] The &quot;scope&quot; of passes
On Thu, Apr 22, 2010 at 11:50 PM, Arjun <arjunsingri at gmail.com> wrote: >> Personally, I would make everything a FunctionPass. > > What if a FunctionPass requires the results of a LoopPass? Is there a way to get > all loops of a function without using LoopPass and LoopInfo? A LoopPass operates on loops. It updates/deletes loops. Its end result is modified loops. A
2012 Jul 05
3
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
Hello; I wrote this simple loop pass to collect the number of instructions in each loop of the program. The code is as follows- #define DEBUG_TYPE "loopinst" #include "llvm/Pass.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" #include "llvm/Instructions.h" #include
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
2011 Feb 28
2
[LLVMdev] LoopInfo of a basic block
Hi all, How Can I get the Loops around an Instruction? I know I can get the basic block of an instruction using inst.getParent() which returns a BasicBlock*. Now I want to use the getLoopFor(BasicBlock) method of the class LoopInfo. But I dont know how to get the LoopInfo. BasicBlock* bb = inst.getParent(); (... what should I add here?) Loop* innerloop = LI -> getLoopFor(bb): Thanks.
2012 Dec 17
3
[LLVMdev] LoopPass doFinalization() called multiple times per program?
On Sun, Dec 16, 2012 at 7:23 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Stephen, > > > On 13/12/12 18:58, Stephen McGruer wrote: > >> I'm wondering if the documentation for LoopPass >> (http://llvm.org/docs/**WritingAnLLVMPass.html#**LoopPass<http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass>) >> is misleading or >> incorrect (or
2012 Dec 16
0
[LLVMdev] LoopPass doFinalization() called multiple times per program?
Hi Stephen, On 13/12/12 18:58, Stephen McGruer wrote: > 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
2011 Nov 10
4
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
John, This did not work. It compiles (isDeclaration was the name of the function) and I passed a reference (&F) (F is a function pointer). I still get the opt load error from the original message (UNREACHABLE exectuted!). Thanks. On Thu, Nov 10, 2011 at 10:00 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > 1. Ok will do. > 2. Ok, will do. > 3. It's a CallGraphPass. I