similar to: [LLVMdev] Incremental SSA update

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Incremental SSA update"

2011 Sep 19
2
[LLVMdev] copy Value object?
Is there a easy way to copy a Value object, so it can be used in multiple instructions without a dominance issue?
2011 Sep 19
2
[LLVMdev] copy Value object?
Sorry, I'm a bit confused by your reply. I think part of my problem is I can only think of this in terms of Passes. For instance, my pass looks for assignments and tries to use the same pointer operand, before the assignment it finds. Like this: new ICmpInst(*block, CmpInst::ICMP_NE, shadow, store->getPointerOperand(), "Shadow check"); So I'm not sure how alloca
2011 Sep 19
0
[LLVMdev] copy Value object?
On 9/19/11 12:53 PM, ret val wrote: > Is there a easy way to copy a Value object, so it can be used in > multiple instructions without a dominance issue? A value object can be used multiple times with no problem. The dominance problem stems from the fact that the program must be in SSA form. When the program uses a value, it must have been defined dynamically for all possible executions
2011 Sep 19
0
[LLVMdev] copy Value object?
On 9/19/11 2:48 PM, ret val wrote: > Sorry, I'm a bit confused by your reply. I think part of my problem is > I can only think of this in terms of Passes. > > For instance, my pass looks for assignments and tries to use the same > pointer operand, before the assignment it finds. Like this: > new ICmpInst(*block, CmpInst::ICMP_NE, shadow, >
2011 May 04
2
[LLVMdev] identifying all dependent instructions through multi-levels of def-use relationship
While working on my optimization pass (a Function Pass), I try to replicate a call instruction and insert it at some earlier location (similar to LICM). However, the instruction I am trying to replicate has dependencies on an uncertain number of instructions that are used to generate an address. A simple example (IR segment): define void @foo() nounwind { entry: %a = alloca i32, align 4;
2018 Jan 26
2
count how many basic block executed
Hello everyone, I am writing a pass to instrument program and count how many basic block executed. What I have tried is to instrument a local counter inside each function, add 1 to the local counter inside each basic block, and save the counter value to a global counter. The current runtime overhead is around 25%. Is there any way I can try to lower the overhead? Like keeping the local counter
2011 May 05
0
[LLVMdev] identifying all dependent instructions through multi-levels of def-use relationship
Dear Chuck, I haven't read all of the details, but it seems that what you need to do is to clone defs before you clone any uses of the def. To do that, you want to iterate over the instructions in dominator-tree order. To do that, you first construct the dominator tree (there is an LLVM analysis pass that does that). Then, you iterate over the basic blocks in the dominator tree from
2004 Nov 23
2
[LLVMdev] Restoring SSA form
Hello, for some my use case, I'd like to temporary break SSA property and then ask LLVM to restore it. Here's more details: if (i < 0) { i = -i; } This is a C code example. I'm trying to create a value range analysis, which will determine, that after this code, 'i' is non-negative. In SSA form, this will become i = 0; if (i < 0) { i.2 = -i; }
2008 Jul 07
2
[LLVMdev] SSA or not SSA?
Hi, Silly question from an LLVM newbie: the LLVM LRM say that the bytecode is "is an SSA based representation". Indeed, my experience with llvm-gcc is that the generated code is not necessarily SSA, while the one given by "llvm-gcc -O1" is. Is this assumption correct? Is there a non-SSA to SSA translator available? Thanks, -- Matthieu
2011 Jan 23
2
[LLVMdev] Undoing SSA and Phi instructions
Hi, I am emitting llvm bit code using llvm-gcc -c -emit-llvm -O0 -o test.bc test.c and then optimizing it with opt -O3 -print-module test.bc in order to obtain a dump of generated IR. The resulting code has Phi nodes and is perhaps in SSA form. I want to undo the SSA form while retaining all the other optimizations. Is mem2reg the right optimization to be added after -O3, i.e., opt -O3
2005 May 27
2
[LLVMdev] SSA in the Front End
Hi, I have been looking into the code that generates the LLVM assembly in the LLVM front end, but I am not very sure if at the time that the llvm_c_expand_body_1 function is called, the SSA form was already constructed (each definition dominates all the uses). Can somebody please tell me? Thanks
2011 Mar 29
3
[LLVMdev] IR in SSA form?
Hi All, When I run the following command llvm-gcc -03 -emit-llvm test.cpp -c -o test.bc or llvm-gcc -emit-llvm test.cpp -c -o test.bc on the program test.cpp, the IR representation is not in SSA form. I do not see any phi functions. program: test.cpp int main(int argc, char **argv) { int a[2],i,j; for(i=0;i<2;i++) { a[i] = i; } return a[1]; } Any clarifications will be
2010 Jun 05
3
[LLVMdev] Converting into SSA form
But, the mem2reg pass removes all load store instructions. It replaces all variables by their if possible (kind of constant propagation). I have generated the bitcode of the source program and the applied the mem2reg pass and obviously not getting desired thing. What I want is convert it into SSA form without replacing any variable by their constant value. Please elaborate on your point. Also,
2007 May 17
1
[LLVMdev] predefined pass for transforming a module to SSA?
Hello, Ying. > But if a module is constructed by hand, how can I transform it into a > SSA-based llvm? LLVM IR is *always* in SSA form, even if you're constructing module by hands (Verifier pass actually does the check and reject invalid code). If you want to eliminate memory accesses and transform them to registers & phi's you might want to run mem2reg pass also. -- With best
2012 Jun 13
3
[LLVMdev] non-SSA IR generation
I am experimenting with LLVM optimizer and found that the bit code file clang emits is already in SSA form, but I want to generate it in non-SSA form. Would you let me know if there is any way of doing it? Cheera,Amruth -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jul 17
3
[LLVMdev] SSA or not SSA?
[ sorry for the late reply ] Patrick Meredith <pmeredit at uiuc.edu> wrote: > All register uses are SSA. Memory is not in SSA. The mem2reg pass > which promotes stack variables to registers effectively converts non- > SSA to SSA. There was a reg2mem pass, written by Andrew Lenharth, I'm > not sure if it's still being maintained. What is the difference between
2010 Jun 01
2
[LLVMdev] Converting into SSA form
Hi, Can anyone tell me, whether it is possible to convert a program into SSA form without considering algebric equivalence ? regards, Chayan
2018 Jan 27
0
count how many basic block executed
On 1/26/18 1:04 AM, Linhai Song via llvm-dev wrote: > > Hello everyone, > > > I am writing a pass to instrument program and count how many basic > block executed. What I have tried is to instrument a local counter > inside each function, add 1 to the local counter inside each basic > block, and save the counter value to a global counter. The current > runtime
2011 Mar 29
0
[LLVMdev] IR in SSA form?
On 3/29/11 12:26 PM, George Baah wrote: > Hi All, > When I run the following command > llvm-gcc -03 -emit-llvm test.cpp -c -o test.bc or llvm-gcc -emit-llvm > test.cpp -c -o test.bc > > on the program test.cpp, the IR representation is not in SSA form. > I do not see any phi functions. Actually, it is in SSA form (or more precisely, the virtual registers are in SSA form;
2008 Jul 07
0
[LLVMdev] SSA or not SSA?
All register uses are SSA. Memory is not in SSA. The mem2reg pass which promotes stack variables to registers effectively converts non- SSA to SSA. There was a reg2mem pass, written by Andrew Lenharth, I'm not sure if it's still being maintained. On Jul 7, 2008, at 8:47 AM, Matthieu Moy wrote: > Hi, > > Silly question from an LLVM newbie: the LLVM LRM say that the