Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Phi nodes"
2007 Mar 28
1
[LLVMdev] Phi nodes
Hi
Thanks for your answers so far. I am currently stumbling into new questions.
Naive as i am, i thought that the llvm-bytecode is allways in SSA form. But
this doesn't seem to be the case. At least there are no phi instructions
embedded if the bytecode drops out of llvm-gcc?
Looking into the archives this has been discussed before:
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
2011 Jan 23
0
[LLVMdev] Undoing SSA and Phi instructions
On 01/22/2011 10:30 PM, Surinder wrote:
> 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
2011 May 17
1
[LLVMdev] eliminate phi nodes, reduce unnecessary loads / stores , reg2mem, mem2reg
Hi,
I work on a pass that requires as input LLVM code without any phi nodes. For
this, I use the reg2mem pass which produces suitable code, the pass runs
correctly, but I obtain a significant performance decrease. I expect that this
is because there are more reads / writes to memory after running the reg2mem
pass.
How can I optimize the code, without inserting any phi nodes? Or is there a
2010 Sep 10
3
[LLVMdev] where are my phi-nodes?
Hi,
I am interested in SSA and read llvm uses SSA in its ir. I decided to write a simple program and compile it with llvm to the human readable assembly language representation of the ir. I expected phi nodes all over the place. However, I could not find a single one! Could you tell my why that is so?
I compiled with "llvm-gcc -emit-llvm test.c -S -o test.ll". Attached to this message
2010 May 13
0
[LLVMdev] How to insert phi
Chayan Sarkar wrote:
> Hi,
> I am new to llvm. I have project in llvm. For that I need SSA form,
> which is already implemented in llvm. Basically I want to know which
> pass insert phi and converts it to SSA form in llvm .
http://llvm.org/docs/Passes.html#mem2reg which is
lib/Transforms/Utils/PromoteMemoryToRegister.cpp.
Nick
2004 Jul 09
0
[LLVMdev] PHI nodes in machine code
On Fri, 9 Jul 2004, Vladimir Prus wrote:
> Misha Brukman wrote:
>
> > LLVM Machine code is in SSA.
>
> This explains quite a lot. I though it's possible to just reduce convert phis
> into copy instructions in predecessors -- all of which will have the same
> destination register.
There are algorithms for eliminating PHI nodes, but they aren't quite so
simple.
2012 Aug 20
0
[LLVMdev] How to eliminate PHI nodes on pointer types?
Hi Andrew,
> Somewhere during optimization PHI nodes on pointer types (including
> alloca instructions) are being introduced, and they persist through the
> scalar replacement of aggregates pass and others. I can't seem to find
> a combination of passes or transformations to get rid of them. Has
> anyone had this problem before, and know a transformation to eliminate
> it?
2012 Aug 20
1
[LLVMdev] How to eliminate PHI nodes on pointer types?
On 08/20/2012 03:46 PM, Duncan Sands wrote:
> Hi Andrew,
>
>> Somewhere during optimization PHI nodes on pointer types (including
>> alloca instructions) are being introduced, and they persist through the
>> scalar replacement of aggregates pass and others. I can't seem to find
>> a combination of passes or transformations to get rid of them. Has
>> anyone
2010 Sep 13
0
[LLVMdev] where are my phi-nodes?
On Sep 13, 2010, at 10:46 AM, John McCall wrote:
> On Sep 13, 2010, at 1:15 AM, Duncan Sands wrote:
>>> I compiled with "llvm-gcc -emit-llvm test.c -S -o test.ll".
>>> Attached to this
>>> message are the source and the resulting ll output.
>>
>> compile with optimization. The llvm-gcc front-end "cheats" and
>> stores/loads
2010 Sep 13
2
[LLVMdev] where are my phi-nodes?
On Sep 13, 2010, at 1:15 AM, Duncan Sands wrote:
>> I compiled with "llvm-gcc -emit-llvm test.c -S -o test.ll". Attached to this
>> message are the source and the resulting ll output.
>
> compile with optimization. The llvm-gcc front-end "cheats" and stores/loads all
> values to/from memory, avoiding the need to construct phi nodes; instead it lets
>
2010 Sep 13
2
[LLVMdev] where are my phi-nodes?
On Sep 13, 2010, at 10:58 AM, Fariborz Jahanian wrote:
> On Sep 13, 2010, at 10:46 AM, John McCall wrote:
>> On Sep 13, 2010, at 1:15 AM, Duncan Sands wrote:
>>>> I compiled with "llvm-gcc -emit-llvm test.c -S -o test.ll". Attached to this
>>>> message are the source and the resulting ll output.
>>>
>>> compile with optimization. The
2004 Feb 05
0
[LLVMdev] Re: phi nodes
Note, I'm CC'ing the list as it's important LLVM design kind of material.
On Thu, 5 Feb 2004, Michael Kahl wrote:
> I note that in your representation of phi nodes, you key the incoming
> value to the incoming block. Both appear explicitly (in pairs) in the
> operand list. There is even a method
> "llvm::PHINode::getIncomingValueForBlock" which performs this
2009 Jan 28
4
[LLVMdev] Copy Instructions?
On Tuesday 27 January 2009 18:28, Eli Friedman wrote:
> You can use a no-op bitcast for scalars, but there isn't any reliable
> way to do it for all first-class values.
Guh.
> That said, I don't quite follow the issue. This is SSA, so the only way a
> value can change is if you change the code.
This isn't (yet) SSA. This is mem2reg turning things into SSA.
>
2009 Jan 28
0
[LLVMdev] Copy Instructions?
On Jan 28, 2009, at 9:06 AM, David Greene wrote:
> On Tuesday 27 January 2009 18:28, Eli Friedman wrote:
>
>> You can use a no-op bitcast for scalars, but there isn't any reliable
>> way to do it for all first-class values.
>
> Guh.
>
>> That said, I don't quite follow the issue. This is SSA, so the
>> only way a
>> value can change is if
2004 Jul 09
2
[LLVMdev] PHI nodes in machine code
Misha Brukman wrote:
> LLVM Machine code is in SSA.
This explains quite a lot. I though it's possible to just reduce convert phis
into copy instructions in predecessors -- all of which will have the same
destination register.
> gets you two definitions of r. So we have machine PHI nodes merge the
> two possible values into one for result of r. These phis get removed
> after
2003 Nov 10
0
[LLVMdev] Re: Alias Analysis Design & Implementation and LLVM
Chris and everyone else,
Below I summarize my understanding of what llvm does when converting to
SSA and a clarification on why backward dataflow analyses can not be
performed on "just" SSA.
>> Scalar variables still have a stack location associated with them,
>> don't they?
>
> No, they don't. All scalar values in LLVM represent "virtual
>
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 Jan 05
1
[LLVMdev] How to deal with phi-nodes
Hi, LLVMers.
I am trying to restore the original HL code from LLVM IR (kinda reverse engineering).
However, I have no good idea about how to handle PHI nodes. It is quite tricky for me to deal with the PHI nodes in LLVM IR in order to restore the original-like code. I read some reverse engineering thesis but they are a little bit old so don't handle SSA form.
Could you shed some lights on
2012 Aug 20
2
[LLVMdev] How to eliminate PHI nodes on pointer types?
Somewhere during optimization PHI nodes on pointer types (including
alloca instructions) are being introduced, and they persist through the
scalar replacement of aggregates pass and others. I can't seem to find
a combination of passes or transformations to get rid of them. Has
anyone had this problem before, and know a transformation to eliminate
it? My optimization passes rely on