similar to: [LLVMdev] how to use LoopInfo outside of LLVM

Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] how to use LoopInfo outside of LLVM"

2005 Jun 25
1
[LLVMdev] how to use LoopInfo outside of LLVM
Hi, My project is outside of LLVM. Now I need get LoopInfo for a function. I know that if my project were a pass inside LLVM. I can get LoopInfo by "AU.addRequired<LoopInfo>()" and "getAnalysis<LoopInfo>()". Also I know I can get a function pass by "llvm::FunctionPass* dce = llvm::createDeadCodeEliminationPass(); dce->runOnFunction(*func)" outside of
2011 Mar 03
0
[LLVMdev] how can I have LoopInfo in a module pass?
I think this assertion failure may be caused by the getAnalysisUsage(). Mine is like the following: class myclass : public ModulePass{ ... virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); } ... } Is it enough? Thanks! Best, --Wenbin ----- Original Message ----- From: Wenbin Zhang To: John Criswell Cc: llvmdev at
2019 Apr 02
2
How can I use llvm::LoopInfo in the runOnModule method?
Hi all, I tried to have a LoopInfo object in a function pass, and add addRequired in getAnalysisUsage, and then use getAnalysis in runOnFunction(). It worked OK. Now I want to have a module pass to traverse the functions, and similarly, I want to have to loop information of the functions. When I did the above in runOnModule, and build the module pass, the following error popped out, and the
2011 Mar 03
0
[LLVMdev] how can I have LoopInfo in a module pass?
On 3/3/11 3:09 PM, Wenbin Zhang wrote: > Hi all, > I tried to have a LoopInfo object in a function pass, add > addRequired<LoopInfo> in getAnalysisUsage, and then use > getAnalysis<LoopInfo> in runOnFunction(). It worked OK. > Now I want to have a module pass to traverse the functions, and > similarly I want to have to loop information of the functions. When I >
2019 Apr 03
3
How can I use llvm::LoopInfo in the runOnModule method?
Interesting that we're getting a relative flood of these recently. See here: http://lists.llvm.org/pipermail/llvm-dev/2019-March/131346.html I don't think one can reliably get a Function analysis pass from within a ModulePass using the legacy pass manager. You have to manually construct the pass yourself. -David Jonathan Smith via llvm-dev <llvm-dev at
2010 Sep 15
0
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
hi, On Wed, Sep 15, 2010 at 8:21 PM, Mariusz Grad <mariusz.grad at gmail.com> wrote: > Hi, > > I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. > It compiles smoothly, but whenever I try to run it I got error like this: > opt: .. PassAnalysisSupport.h:203: AnalysisType&
2011 Nov 10
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
---------- Forwarded message ---------- From: Ryan Taylor <ryta1203 at gmail.com> Date: Thu, Nov 10, 2011 at 10:31 AM Subject: Re: [LLVMdev] Problem getting LoopInfo inside non-LoopPass To: Devang Patel <dpatel at apple.com> I need to iterate bottom up on the nodes, but within that I want to break up BBs within a loop. I could just create a loop pass as another opt and call that, I
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 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,
2011 Feb 28
0
[LLVMdev] LoopInfo of a basic block
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 LoopInfo. > But I dont know how to get the LoopInfo. > > BasicBlock* bb =
2011 Mar 03
2
[LLVMdev] how can I have LoopInfo in a module pass?
Thanks John, I modify my code to like this: bool XXX::ModulePass(Module &M){ .... LoopInfo &li = getAnalysis<LoopInfo>(fi); .... } Here fi is a Function* pointing to main(). Now when I run the pass, another error shows up: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*, llvm::Function&) [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass
2010 Sep 15
2
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
Hi, I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. It compiles smoothly, but whenever I try to run it I got error like this: opt: .. PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &&
2011 Nov 10
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
1. Ok will do. 2. Ok, will do. 3. It's a CallGraphPass. I mentioned this in my first post. 4. Yep, I have the header files included, I'm not sure it would compile otherwise (previously). I would get an error like LoopInfo not declared. I'll try your suggestions, thanks again! On Thu, Nov 10, 2011 at 9:57 AM, John Criswell <criswell at illinois.edu>wrote: > On 11/10/11
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 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
The following code is causing an "UNREACHABLE executed!" and a stack dump, any ideas? namespace { struct myPass : public CallGraphSCCPass { static char ID; myPass() : CallGraphSCCPass(ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LoopInfo>(); } virtual bool runOnSCC(CallGraphSCC &SCC)
2011 Mar 03
2
[LLVMdev] how can I have LoopInfo in a module pass?
Hi all, I tried to have a LoopInfo object in a function pass, add addRequired<LoopInfo> in getAnalysisUsage, and then use getAnalysis<LoopInfo> in runOnFunction(). It worked OK. Now I want to have a module pass to traverse the functions, and similarly I want to have to loop information of the functions. When I did the above in runOnModule, and run the pass, the following error popped
2011 May 17
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi, I am running into the same issue with a module pass, that calls LoopInfo.(does not call DominatorTree) I am using RegisterPass, since it is a dynamically loaded module(as per lib/Transforms/Hello) It does seem possible from the discussion, to use LoopInfo inside a ModulePass. I am wondering what the fix to this problem was. Also, the code works in 2.7.(I did not try 2.8) Thanks, Arushi
2011 Nov 30
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
UNREACHABLE executed! 0 opt 0x00000000008edc2f 1 opt 0x00000000008edfda 2 libpthread.so.0 0x00007f9c8e69bc60 3 libc.so.6 0x00007f9c8d986d05 gsignal + 53 4 libc.so.6 0x00007f9c8d98aab6 abort + 390 5 opt 0x00000000008da974 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 356 6 opt 0x000000000087e046 7 opt
2011 Dec 01
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
Thanks for the info. Curious, do you know if there is an opt that will put all loops, including nested ones, in functions (ie each loop in it's own function)? What I'm trying to do is create a way for each loop to have only one exit. I want all loops to be single exit loops? I can write my own pass but I'd rather not. I think that if I can put each loop into it's own function
2011 Nov 10
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
On 11/10/11 11:48 AM, Ryan Taylor wrote: > John, > > Thanks, this does not compile though, I get this error: First, please CC the llvmdev list. That way, others having the same question can see the conversation, and others on the list can help correct any errors I make. :) > > cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member > named ‘getDeclaration’