[all-commits] [llvm/llvm-project] afc9d6: [CUDA][HIP] support __noinline__ as keyword
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Tue May 10 11:34:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: afc9d674fe5a14b95c50a38d8605a159c2460427
https://github.com/llvm/llvm-project/commit/afc9d674fe5a14b95c50a38d8605a159c2460427
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2022-05-10 (Tue, 10 May 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Basic/Features.def
M clang/include/clang/Basic/TokenKinds.def
M clang/include/clang/Parse/Parser.h
M clang/lib/Basic/IdentifierTable.cpp
M clang/lib/Parse/ParseDecl.cpp
A clang/test/CodeGenCUDA/noinline.cu
A clang/test/Lexer/has_feature.cu
A clang/test/SemaCUDA/noinline.cu
Log Message:
-----------
[CUDA][HIP] support __noinline__ as keyword
CUDA/HIP programs use __noinline__ like a keyword e.g.
__noinline__ void foo() {} since __noinline__ is defined
as a macro __attribute__((noinline)) in CUDA/HIP runtime
header files.
However, gcc and clang supports __attribute__((__noinline__))
the same as __attribute__((noinline)). Some C++ libraries
use __attribute__((__noinline__)) in their header files.
When CUDA/HIP programs include such header files,
clang will emit error about invalid attributes.
This patch fixes this issue by supporting __noinline__ as
a keyword, so that CUDA/HIP runtime could remove
the macro definition.
Reviewed by: Aaron Ballman, Artem Belevich
Differential Revision: https://reviews.llvm.org/D124866
More information about the All-commits
mailing list