[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 11:23:05 PST 2024
AaronBallman wrote:
> > > Thanks for the heads up. I don't think renaming to openmp_assume works for OpenMP. We need to support `#pragma omp assume`, `[[omp::assume]]` and `[[using omp : assume]]` as defined by the standard.
> >
> >
> > Hmm, `[[omp::assume]]` shouldn’t be an issue, because that’s pretty clearly something else. It’s mainly `[[clang::assume]]` and `__attribute__((assume))` that are the problem here.
>
> Both `[[clang::assume]]` and `__attribute__((assume))` are not supported by the standard, so it is up to you what to do with it.
Yeah, that's what we're trying to figure out. :-) GCC supports `__attribute__((assume))` as a synonym for `[[assume]]` and clang supports it as a synonym for OpenMP's assumptions.
But it sounds like my idea doesn't have legs because of OpenMP specification requirements. I'm fine with (3) as an approach then.
https://github.com/llvm/llvm-project/pull/81014
More information about the cfe-commits
mailing list