[PATCH] D139163: Utils: Add utility pass to lower ifuncs

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 17:08:59 PST 2022


MaskRay added a comment.

In D139163#4014337 <https://reviews.llvm.org/D139163#4014337>, @arsenm wrote:

> In D139163#4014314 <https://reviews.llvm.org/D139163#4014314>, @MaskRay wrote:
>
>> You previously said "OpenCL forbids function pointers. If you use target_clones in clang, there's no function pointer in the source and the compiler takes care of everything. I want to patch up subtarget specific implementations of builtin functions. It's not for end users"
>>
>> I take it that if `target_clones` supports non-ifunc use, this patch is not needed. It seems that  `target_clones` indeed works without ifunc (inefficient now, but can be improved), so may I assume that this is not needed?
>
> This is still a way for llvm-reduce to break this into something else it understands how to reduce. This patch does not try to run this anywhere, but adds the testing for the situations for the reduction

Yes, fair. Then update the description?

Things like "For AMDGPU, ideally we would have a host-side resolver function, but failing that, we can have a device side" no longer apply.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139163/new/

https://reviews.llvm.org/D139163



More information about the llvm-commits mailing list