similar to: [LLVMdev] Getting all Basic Blocks in a Loop

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Getting all Basic Blocks in a Loop"

2013 Feb 20
1
[LLVMdev] How to get block with a backedge
I can get the loop header block by using getAnalysis < LoopInfo > ( *F ).isLoopHeader( BB ) But is there any way with with you can also check the blocks containing backedge. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130220/198e4421/attachment.html>
2010 Jun 17
0
[LLVMdev] Loopinfo Analysis
Hi Hisham, Most likely the basic blocks are the headers of two different loops. Try running viewCFG() on the function in question to see if this is the case. Tom ----- Original Message ----- From: "Hisham Chowdhury" <hisham_chow at yahoo.com> To: llvmdev at cs.uiuc.edu Sent: Wednesday, June 16, 2010 7:22:00 PM GMT -05:00 US/Canada Eastern Subject: [LLVMdev] Loopinfo Analysis
2015 Jun 04
2
[LLVMdev] Assert in BlockFrequency pass
> On 2015-Jun-04, at 12:45, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > >> On 2015-Jun-04, at 12:28, Ivan Baev <ibaev at codeaurora.org> wrote: >> >> Hi, we got the following assert: >> >> assert(!Working[0].isLoopHeader() && "entry block is a loop header"); >> >> [in
2010 Jun 16
2
[LLVMdev] Loopinfo Analysis
Hello, I have a question regrading the analysis pass that generates loop info from an .ll code. My previous understanding was there will be just one loop header(in the loop info) for a particular loop. But, when i use isLoopHeader() member function from the loop info class I get 'true' return value for two different basic blocks. Note both basic blocks are loop conditional block(break
2005 Jun 29
1
[LLVMdev] null pointer check missing in LoopInfo
In LLVM 1.5, the function isLoopHeader fails to check for a null pointer after calling getLoopFor. Dunno if this is fixed in CVS, but attaching a patch anyway ... Sameer. -- Research Scholar, KReSIT, IIT Bombay http://www.it.iitb.ac.in/~sameerds/ -------------- next part -------------- --- LoopInfo.h 2005-06-29 17:42:43.000000000 +0530 +++ llvm/include/llvm/Analysis/LoopInfo.h 2005-06-29
2013 Oct 29
1
[LLVMdev] Non-deterministic behavior when using LoopInfo pass in LLVM
Hello, I'm having a little problem with passes that use LoopInfo. Their statistics aren't the same when I execute the same pass multiple times in the same program. After some investigation, I've found out that LoopInfo is the root of the problem. I wrote a little pass that counts the loop headers (number of basic blocks for which LoopInfo.isLoopHeader(BB) is true). I've picked
2015 Jun 04
2
[LLVMdev] Assert in BlockFrequency pass
Hi, we got the following assert: assert(!Working[0].isLoopHeader() && "entry block is a loop header"); [in BlockFrequencyInfoImpl<BT>::tryToComputeMassInFunction(), BlockFrequencyInfoImpl.h] on a Hexagon target - the entry block is a loop header. Has someone seen this assert on other targets? What would be a preferable way to fix it: - extend BlockFrequency pass to
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 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 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
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 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
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
2010 Jul 22
3
[LLVMdev] Controlling the order of a FunctionPass
On Jul 22, 2010, at 2:05 PM, John Criswell wrote: > If you write your pass as a ModulePass, then you can iterate over the > functions in any order that you want. I had considered that, but my FunctionPass depends on other passes processing the functions first: void MyPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<UnifyFunctionExitNodes>();
2008 Nov 30
3
[LLVMdev] Error when using getAnalysis
Hi, I'm trying to use the function getAnalysis. This is the code I'm using : void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.setPreservesAll(); } virtual bool runOnModule(Module &M) { LoopInfo &LI = getAnalysis<LoopInfo>(); } I get following error when I try to run my pass : opt:
2008 Dec 01
0
[LLVMdev] Error when using getAnalysis
nitisha warkari wrote: > Hi, > > I'm trying to use the function getAnalysis. This is the code I'm using : > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<LoopInfo>(); > AU.setPreservesAll(); > } > > virtual bool runOnModule(Module &M) { > LoopInfo &LI = getAnalysis<LoopInfo>(); > >
2009 May 08
3
[LLVMdev] problem with analysis required
Hello, I was trying to get the loop info in a module pass to be able to iterate over the loops int the module itself. Since my pass requires to make module level changes including adding new types to module hence a looppass cannot be used here. I am getting the following error on running opt. opt: /root/llvm-2.4/include/llvm/PassAnalysisSupport.h:199: AnalysisType&
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
2012 Mar 09
2
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
Hello, I am trying to write a new ModulePass using LoopInfo analysis result, but it seems I misunderstand some concept about PassManager. Basically I want to keep LoopInfo analysis result alive. Here is an example showing the problem I encountered, assuming I already addRequired<llvm::LoopInfo>() in getAnalysisUsage: void foo(llvm::Function *F1, llvm::Function *F2) { llvm::LoopInfo