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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 22:21:29 PST 2022


MaskRay added a comment.

Does AMDGPU want to use ifunc to do something special? Note that an ifunc can be emulated by a global function pointer which causes no difference at a call site.
What's the motivation for piggybacking the functionality on top of ifunc?

A dynamic loader knows some properties like HWCAP. Except legacy x86 ifunc implementation, almost all glibc ports pass `dl_hwcap` to the ifunc resolver and some newer ports (aarch64,loongarch, well riscv is unfortunate) even make the struct extensible.
Lowering ifunc in IR makes such information unavailable.


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

https://reviews.llvm.org/D139163



More information about the llvm-commits mailing list