yaxunl added a comment.

In https://reviews.llvm.org/D36327#840658, @bader wrote:

> In https://reviews.llvm.org/D36327#840616, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D36327#839809, @rjmccall wrote:
> >
> > > Could you just implement this in SimplifyLibCalls?  I assume there's some 
> > > way to fill in TargetLibraryInfo appropriately for a platform.  Is that 
> > > too late for your linking requirements?
> >
> >
> > Both the optimized and generic versions of __read_pipe function contains 
> > call of other library functions and are complicate enough not to be 
> > generated programmatically. amdgpu target does not have the capability to 
> > link in library code after LLVM codegen. The linking has to be done before 
> > SimplifyLibCalls.
>
>
> If I understand correctly, SimplifyLibCalls is LLVM IR transformation, so it 
> works before linking and LLVM codegen (e.g. InstCombine passes run this 
> transformation). This pass is doing something similar to what you are trying 
> to achieve for __read_pipe builti-ins: pow(2.0, x) -> llvm.exp2(x).


Thanks. I will take a look.


https://reviews.llvm.org/D36327



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to