similar to: [LLVMdev] How to Check whether BasicBlock resides in a conditional branch

Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] How to Check whether BasicBlock resides in a conditional branch"

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
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 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
2012 Apr 23
1
[LLVMdev] Problem about the type of Function's arguement in llvm
I read the tutorial doc and some info of SSA, finally understand it. Thanks for your help. And the segmentation error of loading arguementation occurs, (gdb error info) Program received signal SIGSEGV, Segmentation fault. 0x0855bb68 in llvm::LoadInst::LoadInst(llvm::Value*, char const*, bool, llvm::Instruction*) () code is like follows: //#include necessary header files int main(){
2012 Apr 22
2
[LLVMdev] Problem about the type of Function's arguement in llvm
in the tutorial of official llvm doc, chapter 3, it deals with arguement of function as follow: for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size(); ++AI, ++Idx) { AI->setName(Args[Idx]); // NamedValues is map<string, Value*> NamedValues[Args[Idx]] = AI; and when it try to get the value of arguement, it simply does: Value
2012 Apr 22
0
[LLVMdev] Problem about the type of Function's arguement in llvm
hi On Sun, Apr 22, 2012 at 8:36 PM, Jianfei Hu <hujianfei258 at gmail.com> wrote: > in the  tutorial of official llvm doc, chapter 3, it deals with arguement of > function as follow: > > for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size(); >        ++AI, ++Idx) { >     AI->setName(Args[Idx]); > >     // NamedValues is map<string, Value*>
2012 Aug 09
2
[LLVMdev] The use-define chain in LLVM
Thanks for your response! But I want to determine wheter the specific variable's value has been changed between two usages of variable, and wheter the parameter's value is changed in a function. Like the reaching definition analysis, and ud chains. 2012/8/9 ��f�� (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw>: > On Thu, Aug 09, 2012 at 11:16:15AM +0800, Jianfei Hu wrote: >>
2012 Aug 17
3
[LLVMdev] Problem of use CallGraph
Hello, I want to traverse CallGraph code segment: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<CallGraph>(); } virtual bool runOnModule(Module &F) { CallGraph &g = getAnalysis<CallGraph>(); for ( CallGraph::iterator i = g.begin(); i != g.end(); i++) { errs()<<"-----------------\n";
2012 Aug 09
2
[LLVMdev] The use-define chain in LLVM
Maybe My statement is not clear. Take an example: main.c: int global; void fun(int array[], int i){ array[i] = i + 1; global = i; } int main(){ int arr[40], i = 0; fun(arr, 10); return 0; } Can I determine whether the value of arr array and global variable have changed after the function call, fun(arr, 10), by LLVM API? It could be more complicated considerring the nested function
2012 Aug 17
0
[LLVMdev] Problem of use CallGraph
On Fri, Aug 17, 2012 at 4:23 PM, Jianfei Hu <hujianfei258 at gmail.com> wrote: > Hello, > I want to traverse CallGraph > > code segment: > > > virtual void getAnalysisUsage(AnalysisUsage &AU) const > { > AU.addRequired<CallGraph>(); > } > > virtual
2012 Aug 09
0
[LLVMdev] The use-define chain in LLVM
On Thu, Aug 9, 2012 at 6:57 AM, Jianfei Hu <hujianfei258 at gmail.com> wrote: > Thanks for your response! > > But I want to determine wheter the specific variable's value has been > changed between > two usages of variable, and wheter the parameter's value is changed in > a function. Like the > reaching definition analysis, and ud chains. > > > 2012/8/9
2012 Aug 09
0
[LLVMdev] The use-define chain in LLVM
On 8/9/12 12:40 AM, Jianfei Hu wrote: > Maybe My statement is not clear. Take an example: > main.c: > int global; > void fun(int array[], int i){ > array[i] = i + 1; > global = i; > } > > int main(){ > int arr[40], i = 0; > fun(arr, 10); > return 0; > } > Can I determine whether the value of arr array and global variable > have changed
2012 Aug 10
3
[LLVMdev] The use-define chain in LLVM
Yes, this demanding comes from our recent research project. If it's avaiable, could you send me the source code of taint-tracking analysis ? I really appreciate your help. Thanks! 2012/8/9 John Criswell <criswell at illinois.edu>: > On 8/9/12 12:40 AM, Jianfei Hu wrote: >> >> Maybe My statement is not clear. Take an example: >> main.c: >> int global; >>
2010 Aug 27
2
[LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?
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? Thanks. Best, --Wenbin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100827/8cf26762/attachment.html>
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
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 Mar 05
3
[LLVMdev] How to .. jump from inline asm to a BasicBlock?
Hello, I have a problem trying to create an inline asm that checks one condition and based on the result of the condition it should jump to one BasicBlock or to another. My question is: is this possible in LLVM, from the inline asm to jump out, to the LLVM code, and if it is, how can I pass the label to which the code should jump. I tried passing the address of the BasicBlocks, using
2012 May 07
6
[LLVMdev] Metadata for Argument, BasicBlock
Hi Duncan, On 5/6/12 6:12 PM, Duncan Sands wrote: > Hi Ralf, > >> Is there a clean way to attach metadata nodes to Arguments and/or >> BasicBlocks? > > not at the moment. Feel free to work on adding this functionality! I am looking into that now. I decided to temporarily go for the following syntax for BasicBlock metadata (subject to discussion): entry:
2005 Jan 13
2
[LLVMdev] the pred_begin and pred_end of BasicBlock
Sorry, still a bit confused. Say we have two basic blocks: A and B. B has a label. There is no branch/control flow instructions explicit uses B. like this: A: code sequence does not contain br/other control flow instruction B: lable_of_b: code sequence Is A still a predecessor of B? Thanks. Chris Lattner wrote: > On Thu, 13 Jan 2005, Zhou Feng wrote: > >> hi, >> I'm