[PATCH] D101011: [Attr] Add "noipa" function attribute

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 25 15:25:05 PDT 2021


MaskRay added a comment.

This attribute will be useful:) Thanks for working on it.

I agree with @jdoerfert (https://lists.llvm.org/pipermail/llvm-dev/2021-April/150062.html) that the proposed attribute, noinline, and optnone should be orthogonal: no one implies the other(s).
If my reading from the long mailing list thread is correct, it is still undecided how the clang attribute should behave.
(Personally I'd hope that the GCC attribute `noipa` ("This attribute is supported mainly for the purpose of testing the compiler.") were different from the GCC attribute `noinline`.)

If the clang attribute would end up combining two attributes, we should better make the IR/clang attribute names different.
`nointeropt` may be a better name anyway because analysis in ipa does not necessarily mean optimization? :)
If our clang attribute is likely to have different semantics (I'd favor orthogonal semantics), `noipa` would be inappropriate as it will conflict with the GCC semantics.
Naming it sometime different will be nice.
For the Linux kernel https://github.com/ClangBuiltLinux/linux/issues/1302 , the kernel can use the clang attribute based on `__clang__`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101011



More information about the llvm-commits mailing list