[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword
Dan Liew via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 17:47:35 PDT 2022
delcypher added inline comments.
================
Comment at: clang/lib/Basic/IdentifierTable.cpp:111
KEYSYCL = 0x1000000,
+ KEYCUDA = 0x2000000,
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
----------------
@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
```
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