<div>Hi Lorenz,</div><div><br></div><div>Thanks for letting me know!  It seems that relocatable device code for CUDA isn't being taken care of by anyone in the LLVM developers community now, so I ended up with a little hacking with nvcc to achieve my goal.  I found the approach on github: https://github.com/apc-llc/nvcc-llvm-ir .  Basically, I used this method to get the unoptimized nvvm IR from nvcc( more precisely, cicc), then invoked my own llvm pass on it to do the transformation I need, and feed the transformed IR back to nvcc's libnvvm backend.  This way, nvcc still takes care of the compilation and linking of device code.</div><div><br></div><div>I'm not sure whether this can be useful for your problem as well, but I think I should let you know.  Hope it helps!</div><div><br></div><div>Thanks!</div><div>Yuanfeng </div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "via llvm-dev";<llvm-dev@lists.llvm.org>;</div><div><b>Send time:</b> Monday, Jun 19, 2017 4:07 PM</div><div><b>To:</b> "llvm-dev"<llvm-dev@lists.llvm.org>; <wbr></div><div></div><div><b>Subject: </b> Re: [llvm-dev] Separate compilation of CUDA code?</div></div><div><br></div>
  
    
  
  
    Hi Yuanfeng,<br>
    <br>
    i have asked about this a few days ago. [0]<br>
    As far as i know there is no such flag available and i did not find
    any information whether this feature will be supported. However i
    would be very interested on any updates on this feature.<br>
    <br>
    Kind Regards<br>
    Lorenz<br>
    <p>[0]
      <a class="moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html">http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html</a><br>
    </p>
    <br>
    <div class="moz-cite-prefix">Am 14.06.17 um 19:18 schrieb Yuanfeng
      Peng via llvm-dev:<br>
    </div>
    <blockquote type="cite" cite="mid:tencent_080927ED5B450FBD38D58A50@qq.com">
      <div>Hi,</div>
      <div><br>
      </div>
      <div>I wonder whether the current version of LLVM supports
        separate compilation and linking of device code, i.e., is there
        a flag analogous to nvcc's --relocatable-device-code flag?  If
        not, is there any plan to support this?</div>
      <div><br>
      </div>
      <div>Thanks!</div>
      <div>Yuanfeng Peng  </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Lorenz Braun
Research Associate
Institute of Computer Engineering (ZITI)
B6, 26, Building B, Office B2.20
68131 Mannheim

Phone: +49-621-181-2696
<a class="moz-txt-link-abbreviated" href="mailto:lorenz.braun@ziti.uni-heidelberg.de">lorenz.braun@ziti.uni-heidelberg.de</a></pre></div>