[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 10:15:50 PDT 2022
erichkeane added inline comments.
================
Comment at: clang/test/CodeGenCUDA/noinline.cu:1
+// optimization is needed, otherwise by default all functions have noinline.
+
----------------
aaron.ballman wrote:
> I've asked @erichkeane to weigh in on whether there's a better approach here than specifying an optimization level.
You don't need to do this, it looks like all you're trying to do is keep 'clang' out of `O0` mode. However, what you do NOT want is the optimizations to run. The common way to do that is to combine `O1`/`O2`/etc like: `-O2 -disable-llvm-passes`
This will keep clang in `O2` mode, but will keep the optimizer from running anything, which might mess with the test later on.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124866/new/
https://reviews.llvm.org/D124866
More information about the cfe-commits
mailing list