<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Awesome!  Thanks for letting me know, Artem!<div class=""><br class=""></div><div class="">yuanfeng<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 21, 2016, at 3:09 PM, Artem Belevich <<a href="mailto:tra@google.com" class="">tra@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">r267062 removed __nvvm_reflect_anchor() so you should no longer see this particular manifestation of illegal-character-in-PTX problem.<br class=""><div class=""><br class=""></div><div class="">--Artem</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Apr 9, 2016 at 12:48 PM, Artem Belevich <span dir="ltr" class=""><<a href="mailto:tra@google.com" target="_blank" class="">tra@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="">David's change makes nvvm_reflect_anchor unnecessary. The issue with dots in names generated by llvm still needs to be fixed.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Apr 9, 2016 8:32 AM, "Jingyue Wu" <<a href="mailto:jingyue@google.com" target="_blank" class="">jingyue@google.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Artem, <div class=""><br class=""></div><div class="">With David's <a href="http://reviews.llvm.org/rL265060" target="_blank" class="">http://reviews.llvm.org/rL265060</a>, do you think __nvvm_reflect_anchor is still necessary? </div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Apr 8, 2016 at 9:37 AM, Yuanfeng Peng via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Yeah, '.' is the direct reason for the ptxas failure here.  I'm curious, however, about what the purpose of nvvm_reflect_anchorv() is here, and why does the front-end always generate this function? Since the current PTX emission doesn't mangle dots, it would be a reasonable workaround for me to prevent the front-end from generating this function in the first place.   Is there any magic option available to do so?<div class=""><span style="font-size:17.6px" class=""><br class=""></span></div><div class=""><span style="font-size:17.6px" class="">Thanks!</span></div><span class=""><font color="#888888" class=""><div class=""><span style="font-size:17.6px" class="">yuanfeng </span><br class=""></div></font></span></div><div class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 7, 2016 at 5:19 PM, Reid Kleckner <span dir="ltr" class=""><<a href="mailto:rnk@google.com" target="_blank" class="">rnk@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">The actual problem here is that PTX appears to not allow '.' in symbol names. We should probably just change our PTX emission to mangle dots somehow.</div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""><div class="">On Thu, Apr 7, 2016 at 4:24 PM, Yuanfeng Peng via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">I needed to compile a cuda source file (say, <a href="http://a.cu/" target="_blank" class="">a.cu</a>) into IR (a.bc), and then merge a.bc with another bitcode file (b.bc, compiled from <a href="http://b.cu/" target="_blank" class="">b.cu</a>).  So I used <b class="">llvm-link a.bc b.bc -o c.bc</b></div><div class=""><br class=""></div><div class="">However, I noticed that an internal function '<b class=""> _ZL21__nvvm_reflect_anchorv() </b>' is defined in both a.bc & b.bc, and when merging these two files, one of the two definitions was renamed to  '<b class="">_ZL21__nvvm_reflect_anchorv.2()</b>', and written into c.bc.</div><div class=""><br class=""></div><div class=""> Then I did <b class="">llc c.bc -o c.s -march=nvptx ; ptxas c.s -o c.o</b></div><div class=""><b class=""><br class=""></b></div><div class="">However, ptxas would give the following complaint:</div><div class=""><br class=""></div><div class=""><p class=""><span class=""><i class="">ptxas c.s, line 171; error   : Duplicate definition of function '_ZL21__nvvm_reflect_anchorv'</i></span></p><p class=""><span class=""><i class="">ptxas c.s, line 171; fatal   : Parsing error near '.2': syntax error</i></span></p><p class="">So I inspected c.s and found the issue above was caused by the following line:</p><div class="">







<br class="webkit-block-placeholder"></div><p class=""><span class="">.<i class="">func</i></span><i class=""><span class="">  (</span><span class="">.param</span><span class=""> .</span><span class="">b32</span><span class=""> </span><span class="">func_retval0</span><span class="">) </span><span class="">_ZL21__nvvm_reflect_anchorv</span><span class="">.</span><span class="">2</span><span class="">() </span><span class="">// @_ZL21__nvvm_reflect_anchorv.2</span></i></p><p class="">After I manually deleted the definition of this function in c.s, the compilation works file.  I wonder how could I force llc to remove  <b class="">`</b><span style="font-weight:bold" class="">_ZL21__nvvm_reflect_anchorv</span><span style="font-weight:bold" class="">.</span><span style="font-weight:bold" class="">2</span><span class=""><b class="">()`</b>? Or is that possible to prevent </span><span style="font-weight:bold" class="">_ZL21__nvvm_reflect_anchorv</span><span class=""><b class="">() </b>from being generated into a.bc & b.bc in the first place?  </span>Or is this possible to ask llvm-link to NOT rename <b class=""><span class="">_ZL21__nvvm_reflect_anchorv(</span><span class="">) </span></b><span class=""><i class="">into </i><b class="">ZL21__nvvm_reflect_anchorv</b></span><b class=""><span class="">.</span><span class="">2</span></b><span class=""><b class="">()</b>? </span></p><p class=""><span class=""><i class=""><br class=""></i></span></p><p class=""><span class="">Thanks!</span></p><span class=""><font color="#888888" class=""><p class=""><span class=""><i class="">Yuanfeng Peng </i></span><b class=""> </b></p><p class=""><span class=""><i class=""><br class=""></i></span></p></font></span></div></div>
<br class=""></div></div>_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</blockquote></div><br class=""></div>
</div></div><br class="">_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</blockquote></div>
</div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class="">--Artem Belevich</div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>