[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 6 16:20:26 PST 2024
Sirraide wrote:
I’ve implemented what we’ve decided on as a result of the RFC and also renamed the attribute to `CXXAssumeAttr` and the OpenMP one to `OMPAssumeAttr` so we don’t confuse the two.
> > 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 (if that isn’t already a thing)
> 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]]`.
@AaronBallman, @erichkeane Thoughts on this?
https://github.com/llvm/llvm-project/pull/81014
More information about the cfe-commits
mailing list