similar to: [LLVMdev] LoopInfo are not able to identify some natural loops?

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] LoopInfo are not able to identify some natural loops?"

2011 Apr 30
0
[LLVMdev] LoopInfo are not able to identify some natural loops?
A natural loop is one whose header dominates all of the nodes in the loop. There is probably some block outside of the loop jumping to a block in the loop body. Cameron On Apr 29, 2011, at 7:43 PM, Bo Wu <bwu at cs.wm.edu> wrote: > Hi, > > I found that some loops can not be identified by LoopInfo pass. For example, the loop at line 3094 of rdopt.c of benchmark 464.h264ref from
2011 Apr 30
3
[LLVMdev] LoopInfo are not able to identify some natural loops?
In C code, if a loop is not a natural loop, that means its loop body should at least have one label, right? In that case, some BB out of the loop can jump to the loop body, so the loop has more than on entry. Does LoopInfo guarantee to identify all natural loops? This property is very important for my pass. regards, Bo On Fri, Apr 29, 2011 at 11:50 PM, Cameron Zwarich <zwarich at
2011 May 01
0
[LLVMdev] LoopInfo are not able to identify some natural loops?
On 4/30/11 8:52 AM, Bo Wu wrote: > In C code, if a loop is not a natural loop, that means its loop body > should at least have one label, right? In that case, some BB out of > the loop can jump to the loop body, so the loop has more than on entry. Off the top of my head, I would think you are right: a C label would have to exist within the loop in order to have a jump from outside the
2011 May 01
2
[LLVMdev] LoopInfo are not able to identify some natural loops?
Thanks for the reply. The LoopInfo pass can actually identify the loop I mentioned. My former question is due to a bug in my pass. What I worried is that LoopInfo can not identify all the natural loops for the benchmarks I use, but now I haven't found any such cases. Bo On Sun, May 1, 2011 at 4:24 PM, John Criswell <criswell at illinois.edu> wrote: > On 4/30/11 8:52 AM, Bo Wu
2011 Apr 27
2
[LLVMdev] getSmallConstantTripCount problem
In my pass, I add LoopInfo as a required pass. Then I'd like to print the constant loop trip count of each loop if it has one. However, every time I call loop-> getSmallConstantTripCount(), it returns 0, even for a very simple loop: for(i=0; i<3; ++i) {;} What's the possible cause of this problem? regards, Bo -------------- next part -------------- An HTML attachment was
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.
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 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 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 >
2015 Oct 28
2
how to get LoopInfo in FunctionPass in LLVM3.7.0
I want get some loop information(the methods are included in LoopInfo class) ,but when I use "const LoopInfo *LI=&getAnalysis<LoopInfo>()", I got a compiler error. the version of LLVM is 3.7.0. can anyone help me?please give me some example.thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL:
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 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
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
2012 Oct 03
2
[LLVMdev] LoopInfo analysis in CallGraphSCCPass
Hi, Is it possible to recreate the LoopInfo analysis in my pass? Thanks , Vinay On Wed, Oct 3, 2012 at 2:34 PM, Chandler Carruth <chandlerc at google.com>wrote: > This is not currently supported by the LLVM pass manager system. It is a > serious deficiency that I (and others) would like to address, but it > requires significant changes to the pass manager and analysis
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 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 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
2012 Oct 03
0
[LLVMdev] LoopInfo analysis in CallGraphSCCPass
On Wed, Oct 3, 2012 at 2:33 AM, vinay m <mvinay05041990 at gmail.com> wrote: > Hi, > Is it possible to recreate the LoopInfo analysis in my pass? > No. You need your pass to be a FunctionPass in order to use the LoopInfo (and associated) analyses. > > Thanks , > Vinay > > On Wed, Oct 3, 2012 at 2:34 PM, Chandler Carruth <chandlerc at google.com>wrote:
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 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)