Hi Maarten,<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">
<span class="Apple-style-span" style="font-family: arial; white-space: normal; font-size: small; ">If you look at the start of basic block 2 (<font class="Apple-style-span" face="'courier new', monospace">bb2</font>) you'll see the following instruction:</span></pre>
</span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; "> %a_addr.0 = phi i32 [ 1, %bb ], [ 0, %bb1 ]     ; <i32> [#uses=1]</pre>
</span><div>This is an SSA phi node which assigns a value of either 1 or 0 to %a_addr.0 depending on whether control reached the PHI node from basic block bb, or bb1.</div><div><br></div><div>- Lang.</div><br><div class="gmail_quote">
On Thu, Sep 23, 2010 at 11:26 PM, maarten faddegon <span dir="ltr"><<a href="mailto:m.faddegon@student.tudelft.nl">m.faddegon@student.tudelft.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I am studying SSA and some time ago I asked on this list how to see the<br>
phi nodes in the llvm ir output. I learned then to use this command:<br>
opt -mem2reg test.ll -S > test_mem2reg.ll<br>
<br>
However, if you look at the output (attached to this message) there is<br>
something I do not understand. At the end of the function @f at line 18,<br>
the function returns the variable %a_addr.0. However, this variable is<br>
never defined or set. The variable %a is. Is "_addr.0"  a way to get the<br>
address of a variable? I could not find anything about this in in LLVM<br>
language reference manual.<br>
Where does this variable come from?<br>
<br>
<br>
thanks,<br>
<font color="#888888">  Maarten Faddegon<br>
</font><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>