[all-commits] [llvm/llvm-project] f2a78e: [AMDGPU] Do not emit arch dependent macros with un...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Jan 30 11:05:41 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2a78e68eee53646327f71c475c7f18a28b7f576
https://github.com/llvm/llvm-project/commit/f2a78e68eee53646327f71c475c7f18a28b7f576
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths:
M clang/docs/HIPSupport.rst
M clang/lib/Basic/Targets/AMDGPU.cpp
M clang/test/CodeGenOpenCL/builtins-amdgcn-wave64.cl
M clang/test/Preprocessor/predefined-arch-macros.c
Log Message:
-----------
[AMDGPU] Do not emit arch dependent macros with unspecified cpu (#80035)
Summary:
Currently, the AMDGPU toolchain accepts not passing `-mcpu` as a means
to create a sort of "generic" IR. The resulting IR will not contain any
target dependent attributes and can then be inserted into another
program via `-mlink-builtin-bitcode` to inherit its attributes.
However, there are a handful of macros that can leak incorrect
information when compiling for an unspecified architecture. Currently,
things like the wavefront size will default to 64, which is actually
variable. We should not expose these macros unless it is known.
More information about the All-commits
mailing list