[all-commits] [llvm/llvm-project] 6adb9a: [AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Fri May 12 16:01:18 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6adb9a0602bcd75acd383e13c253e471edc9b189
https://github.com/llvm/llvm-project/commit/6adb9a0602bcd75acd383e13c253e471edc9b189
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2023-05-12 (Fri, 12 May 2023)
Changed paths:
M clang/include/clang/Basic/DiagnosticDriverKinds.td
M clang/lib/Basic/Targets/AMDGPU.cpp
M clang/lib/Basic/Targets/AMDGPU.h
M clang/lib/Driver/ToolChains/AMDGPU.cpp
M clang/lib/Driver/ToolChains/Arch/PPC.cpp
M clang/lib/Driver/ToolChains/Arch/RISCV.cpp
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/lib/Driver/ToolChains/CommonArgs.h
M clang/lib/Driver/ToolChains/Hexagon.cpp
M clang/lib/Driver/ToolChains/Hexagon.h
A clang/test/CodeGenHIP/hip-cumode.hip
M clang/test/Driver/amdgpu-macros.cl
M clang/test/Driver/hip-macros.hip
M llvm/include/llvm/TargetParser/TargetParser.h
M llvm/lib/TargetParser/TargetParser.cpp
Log Message:
-----------
[AMDGPU] Emit predefined macro `__AMDGCN_CUMODE__`
Predefine __AMDGCN_CUMODE__ as 1 or 0 when compilation assumes CU or WGP modes.
If WGP mode is not supported, ignore -mno-cumode and emit a warning.
This is needed for implementing device functions like __smid
(https://github.com/ROCm-Developer-Tools/hipamd/blob/312dff7b794337aa040be0691acc78e9f968a8d2/include/hip/amd_detail/amd_device_functions.h#L957)
Reviewed by: Matt Arsenault, Artem Belevich, Brian Sumner
Differential Revision: https://reviews.llvm.org/D145343
More information about the All-commits
mailing list