similar to: [LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?"

2010 Aug 27
2
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
----- Original Message ----- From: "John Criswell" <criswell at illinois.edu> To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu> Cc: <llvmdev at cs.uiuc.edu> Sent: Friday, August 27, 2010 5:09 PM Subject: Re: [LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function? > Wenbin Zhang wrote: >> Dear all,
2010 Aug 27
0
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
Wenbin Zhang wrote: > Dear all, > Is there a way to check whether we can go from A to B within a > function when I'm writing a pass? I assume you are asking whether control flow can pass from BasicBlock A to BasicBlock B. In that case, yes: all you need to do is look at the terminator instruction of BasicBlock A and see if it can branch to BasicBlock B. There's a new indirect
2010 Aug 27
0
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
Wenbin Zhang wrote: > ----- Original Message ----- > From: "John Criswell" <criswell at illinois.edu> > To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu> > Cc: <llvmdev at cs.uiuc.edu> > Sent: Friday, August 27, 2010 5:09 PM > Subject: Re: [LLVMdev] how to check whether from basicblock A we can go to > basicblock B within the same
2010 Aug 05
1
[LLVMdev] a problem when using postDominatorTree
Wenbin Zhang wrote: > I'll try the trunk, as well as check my code again. If indeed it's not > fixed, I'll try to post a triggering case here. > Thanks for the advice~ > Did you run the -mergereturn pass (it might also be called UnifyExitNodes in the source code)? This is the pass that ensures that each function has exactly one basic block that returns control to the
2010 Aug 27
2
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
> Every basic block ends with a terminator instruction that indicates > which basic block or basic blocks it should branch to next. Switch, > invoke, and branch are all terminator instructions. There may be more > that I don't remember. > Why not just use the predecessor and successor iterator? http://llvm.org/docs/ProgrammersManual.html#iterate_preds
2010 Sep 01
0
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
On Fri, 27 Aug 2010, Guoliang Jin wrote: > > > Every basic block ends with a terminator instruction that indicates > > which basic block or basic blocks it should branch to next. Switch, > > invoke, and branch are all terminator instructions. There may be more > > that I don't remember. > > > Why not just use the predecessor and successor iterator? >
2010 Aug 27
0
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
Yes, that would be better. -----Original Message----- From: Guoliang Jin <jingl1345 at gmail.com> Sent: Friday, August 27, 2010 5:05 PM To: llvmdev at cs.uiuc.edu <llvmdev at cs.uiuc.edu> Subject: Re: [LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function? > Every basic block ends with a terminator instruction that indicates >
2010 Aug 05
0
[LLVMdev] a problem when using postDominatorTree
I'll try the trunk, as well as check my code again. If indeed it's not fixed, I'll try to post a triggering case here. Thanks for the advice~ Best, --Wenbin ----- Original Message ----- From: "Tobias Grosser" <grosser at fim.uni-passau.de> To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu> Cc: <llvmdev at cs.uiuc.edu> Sent: Thursday, August
2010 Aug 05
3
[LLVMdev] a problem when using postDominatorTree
On 08/05/2010 06:46 AM, Wenbin Zhang wrote: > Hi all, > I'm using postDominatorTree to do some program analysis. My code works > well for small tests, but when I run it on real applications, the > following error occurs: > /Inorder PostDominator Tree: DFSNumbers invalid: 0 slow queries. > [1] <<exit node>> {0,21} > [2] %bb1 {1,2} > [2] %bb {3,4} > [2]
2010 Jul 21
1
[LLVMdev] Can we map a instruction in IR back to source code?
Hi all, Can we map an IR instruction to the correlated source code? Or, if I want to recognize an assignment statement in the source code, can we quickly find all the related IR instructions according to a 'store'? E.g., i = j +k + m[5] in IR will have some loads and some getelementptrs. Can we define which IRs are related to this assignment? Thanks. Regards, --Wenbin --------------
2010 Jul 22
2
[LLVMdev] the generation of getelementptr instruction
Hi all, I'm reading the language reference of LLVM here: http://llvm.org/docs/LangRef.html#i_getelementptr In the first example, it shows that the generated IR is supposed to be something like: %reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13 But when I copied the code and compile it myself (using v2.7), I got five getelementptr instructions, which are just like the equivalent
2012 Aug 25
2
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
2012/8/25 Iaroslav Markov <ymarkov at cs.stonybrook.edu>: > Can't you do it by performing some analysis on CFG? You can traverse that structure with BFS. And after that for all the BB you have visited more than once, you try to find a parent that has a branch instruction as a terminator. Additionally you ensure that there are no BB with branches as terminators on your way. If such
2012 Aug 25
0
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Can't you do it by performing some analysis on CFG? You can traverse that structure with BFS. And after that for all the BB you have visited more than once, you try to find a parent that has a branch instruction as a terminator. Additionally you ensure that there are no BB with branches as terminators on your way. If such parent exist, you mark that there is exist a direct connection between
2012 Aug 25
6
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hello All, I want to dertermine whether a basicblock is in a conditional branch. such as, //============================= if a > 2 // BasicBlock A then BasicBlock B endif BasicBlock C //============================= What I want to identify is BasicBlock B, which is in a condtional block. but C is not. In other words, I want to distinguish BasicBlocks that * must * be executed and that
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
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
2012 Aug 25
0
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
In the general sense you may get some help by looking at the control dependence graph. - dibyendu ----- Original Message ----- From: Jianfei Hu [mailto:hujianfei258 at gmail.com] Sent: Saturday, August 25, 2012 07:43 AM To: LLVMdev at cs.uiuc.edu <LLVMdev at cs.uiuc.edu> Subject: [LLVMdev] How to Check whether BasicBlock resides in a conditional branch Hello All, I want to dertermine
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 >
2012 Aug 26
0
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hi Jianfei Hu, the GVN pass does something like this in the logic around GVN::propagateEquality. If in your example it was if a == 2 // BasicBlock A then then it replaces all occurrences of a with 2 in BasicBlock A. For this it needs to understand which basic blocks can only be reached via this conditional edge "a == 2". Ciao, Duncan. > Hello All, > > I want to
2011 May 03
2
[LLVMdev] BasicBlock Cloning
Hi I have clone a basic block using CloneBasicBlock function but it does not clone the predecessor with it. I am not able to figure out, how to set the predecessor of the cloned basic block. Tarun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110504/74cdc609/attachment.html>