<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jan 4, 2015, at 12:04 AM, Liu Xin <<a href="mailto:navy.xliu@gmail.com" class="">navy.xliu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><p class=""><span class="">%</span><span class="">294</span><span class=""> = </span><span class="">call</span><span class=""> </span><span class="">float</span><span class=""> bitcast (</span><span class="">float</span><span class=""> (</span><span class="">float</span><span class="">, </span><span class="">float</span><span class="">*)* @__</span><span class="">gpu_mod</span><span class="">ff to </span><span class="">float</span><span class=""> (</span><span class="">float</span><span class="">, i64)*)(</span><span class="">float</span><span class=""> %</span><span class="">293</span><span class="">, i64 %preg</span><span class="">.212</span><span class="">.addr</span><span class="">.0</span><span class="">)</span></p><p class=""><span class="">as you may know, some gpu backends don't support function call. we need to make sure to inline all functions here. however, Inliner can not figure out that this is a valid callsite in this form. actually, it is. in C words, cast a function and then call should be treat as callsite, right? </span></p><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div>LLVM’s inliner does not support indirect calls. I have encountered the same problem before, but instead of adding support for indirect call, it might be easier to modify the code to generate the accurate function signature and thus avoid the explicit cast.</div><div><br class=""></div><div>thanks,</div><div>chen<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><p class=""><span class="">thanks,</span></p><p class=""><span class="">--lx</span></p><p class=""><span class=""><br class=""></span></p></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" class="">http://llvm.cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class=""></div></blockquote></div><br class=""></body></html>