[clang] [clang] Add per-global code model attribute (PR #72078)

Xi Ruoyao via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 09:37:47 PST 2023


xry111 wrote:

> Do folks feel like the attribute name is sufficiently descriptive? i.e. should it be `__attribute__((code_model("asdf")))`? Are we aiming for GCC compat here? What guides the naming choice?

Yes, for GCC compat, so we don't need to add more #ifdef's in kernel.

As the author of the GCC attribute: the name choice was "borrowed" from IA64.  I have to admit that maybe I learnt from a bad example (anyway IA64 is in a zombie state now since it's removed from the kernel), but for now I don't see too much benefit to rename this.

https://github.com/llvm/llvm-project/pull/72078


More information about the cfe-commits mailing list