[PATCH] D90275: [clang][IR] Add support for leaf attribute

Gulfem Savrun Yeniceri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 13:18:48 PST 2020


gulfem added a comment.

In D90275#2371343 <https://reviews.llvm.org/D90275#2371343>, @jdoerfert wrote:

> The more I think about it, the more I think we should never create a `leaf`/`nocallback` definition. Only declarations should carry that attribute.

Leaf attribute is specifically intended for library functions and I think all the existing usage of leaf attribute is in the library function declarations.
For ex, it is only used in syscalls in Fuchsia.
Therefore, I'm not sure whether it is really necessary to ban leaf attribute in function definitions.
Even though function attributes are typically intended to be used in the function declaration, compilers do not have policy to forbid using them in the function definition.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90275



More information about the cfe-commits mailing list