[PATCH] D124701: [clang] Honor __attribute__((no_builtin("foo"))) on functions

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 09:30:07 PDT 2022


aaron.ballman added a comment.

In D124701#3485647 <https://reviews.llvm.org/D124701#3485647>, @steplong wrote:

> In D124701#3485317 <https://reviews.llvm.org/D124701#3485317>, @hans wrote:
>
>> If I understand correctly, D68028 <https://reviews.llvm.org/D68028> made it so that LLVM doesn't add any builtin calls (e.g. turning for-loops into memcpy), but Clang could still turn calls into builtins. Maybe the patch description could be expanded to explain this?
>
> I'm not too sure, but I think D68028 <https://reviews.llvm.org/D68028> just adds the attribute nobuiltin, but it gets ignored. It doesn't seem to affect the calls in the function. They're still being converted into builtins even with the attribute on the function.

Correct -- that commit was just adding the attribute and ensuring it parsed correctly and met semantic requirements. That's why its documentation says `.. Note:: This attribute is not yet fully implemented, it is validated but has no effect on the generated code.` There is more interesting discussion in https://reviews.llvm.org/D61634 that relates.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124701



More information about the cfe-commits mailing list