[cfe-dev] Builtin vs magic library function

Jon Chesterfield via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 2 04:10:02 PDT 2018


Given some target specific IR intrinsics, in this case a load instruction
for various types, I can target said intrinsic using a clang builtin
function or an IR pass that recognises the function call.

Is one approach considered better than the other?

Libm calls seem to be a mixture. Builtins are available that sometimes
lower to IR intrinsics, sometimes to library calls. Library calls sometimes
get turned into IR intrinsics. Optimisations act on one or the other.

IR pass seems easier to test but there's not much in it.

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180702/d4e44626/attachment.html>


More information about the cfe-dev mailing list