<div dir="ltr"><div>That REALLY sounds like something that should be done at an earlier stage in the compilation - at LLVM level, you can't really know whether something was produced by the compiler itself, or as a consequence of something in the source code. <br><br></div><div>Unless there is some very specific pattern to those varibles (e.g. "they are always called XYZ_abc_kerflunk_billy_bob_*" - it is unlikely that the compiler will call a generated variable that).<br></div><div><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 February 2016 at 17:17, Mohammad Norouzi via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm writing a pass that eliminates some variables. To show the effect of the pass i need to show that I deleted the variables that originally appear in the user code, not temporary variables added by llvm.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 8, 2016 at 5:59 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Feb 8, 2016, at 6:39 AM, Mohammad Norouzi via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I need to check if a variable belongs to the program originally. Consider the following code line:<br>
><br>
> y = x + 4<br>
><br>
> and its corresponding llvm ir (roughly):<br>
><br>
> %16 = load i32 %x<br>
> %add = add i32 %16, i32 4<br>
> store i32 %add, %y<br>
><br>
> I need to distinguish between %16, %add and %x, %y.<br>
<br>
<br>
</span>This look like it will quickly degrades with optimization to a point where it won't be meaningful.<br>
Why are you needing this? What are you trying to accomplish?<br>
<span><font color="#888888"><br>
--<br>
Mehdi<br>
<br>
</font></span></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>