[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 08:36:52 PDT 2017


yaxunl added a comment.

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

> Hi Sam,
>
> What do you think about implementing this optimization in target specific optimization pass? Since size/alignment is saved as function parameter in LLVM IR, the optimization can be done in target specific components w/o adding additional conditions to generic library.
>
> Thanks,
> Alexey


Hi Alexey,

The optimization of the power-of-2 type size is implemented as a library function. Our backend lacks the capability to link in library code at ISA level, so linking of the optimized library function has to be done before any target-specific passes. It seems the only place to do this is Clang codegen since Clang/llvm does not support target-specific pre-linking passes.


https://reviews.llvm.org/D36327





More information about the cfe-commits mailing list