[LLVMdev] should AlwaysInliner inline this case?

Chen Li meloli87 at gmail.com
Sun Jan 4 00:32:44 PST 2015


> On Jan 4, 2015, at 12:04 AM, Liu Xin <navy.xliu at gmail.com> wrote:
> 
> %294 = call float bitcast (float (float, float*)* @__gpu_modff to float (float, i64)*)(float %293, i64 %preg.212.addr.0)
> 
> 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? 
> 
> 

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.

thanks,
chen
> thanks,
> 
> --lx
> 
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150104/51d78baf/attachment.html>


More information about the llvm-dev mailing list