[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 09:19:53 PDT 2024


Sirraide wrote:

> I'm not against removing the attribute, but we will have to find another way to do that for clspv. Do you know something we could use to get rid of the assume attribute?

An attribute does make sense for that imo; the problem is that `assume` is really not an ideal name for an attribute... Would it be possible to use the C++11/C23 attribute syntax using `[[]]`? That would solve the problem because we could use the `[[omp::assume]]` spelling. 

Alternatively, if any attribute would work, we could introduce a separate one to make it clear that it’s intended for libclc, becuase your use case sounds like it doesn’t have anything to do with OpenMP, but maybe I’m misunderstanding something here. Also, maybe @AaronBallman has another idea as to what we could do here.


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


More information about the cfe-commits mailing list