[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 19:52:46 PDT 2022
yaxunl added inline comments.
================
Comment at: clang/lib/Basic/IdentifierTable.cpp:111
KEYSYCL = 0x1000000,
+ KEYCUDA = 0x2000000,
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
----------------
delcypher wrote:
> @yaxunl Is it intentional that you didn't update `KEYALL` here? That means `KEYALL` doesn't include the bit for `KEYCUDA`.
>
> If that was your intention then this will break if someone adds a new key. E.g.
>
> ```
> KEYCUDA = 0x2000000,
> KEYSOMENEWTHING = 0x4000000,
> // ...
> // KEYALL now includes `KEYCUDA`, whereas it didn't before.
> // KEYALL includes KEYSOMENEWTHING
> KEYALL = (0x7ffffff & ~KEYNOMS18 &
> ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
> ...
> ```
>
>
> 1. Updating the `0x1ffffff` constant to `0x3ffffff` so that `KEYALL` includes `KEYCUDA`
> 2. If your intention **is** to not have `KEYCUDA` set in `KEYALL` then amend `KEYALL` to be.
>
> ```
> KEYALL = (0x7ffffff & ~KEYNOMS18 &
> ~KEYNOOPENCL & ~KEYCUDA ) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
> // KEYCUDA is not included in KEYALL
> ```
My intention is not to include KEYCUDA in KEYALL.
Should I change KEYALL to
```
KEYALL = (0x3ffffff & ~KEYNOMS18 &
~KEYNOOPENCL & ~KEYCUDA ) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
// KEYCUDA is not included in KEYALL
```
instead of
```
KEYALL = (0x7ffffff & ~KEYNOMS18 &
~KEYNOOPENCL & ~KEYCUDA ) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
// KEYCUDA is not included in KEYALL
```
since the current maximum mask is 0x3ffffff instead of 0x7ffffff
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124866/new/
https://reviews.llvm.org/D124866
More information about the cfe-commits
mailing list