[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 06:53:18 PST 2024


Sirraide wrote:

> But it sounds like my idea doesn't have legs because of OpenMP specification requirements. I'm fine with (3) as an approach then.

I think a hybrid approach between (3) and what you’re suggesting might make sense:
1. Introduce `[[omp::assume]]` for OpenMP
2. Deprecate `[[clang::assume]]` and `__attribute__((assume))`, telling people to use `[[omp::assume]]` or `[[assume]]` instead, depending on where we encounter the attribute, and maybe, eventually
3. Change `__attribute__((assume))` (and `[[clang::assume]]` if we care enough about that one) to be synonyms for `[[assume]]`.

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


More information about the cfe-commits mailing list