[all-commits] [llvm/llvm-project] c9a6e9: [AMDGPU] Do not emit arch dependent macros with un...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Jan 29 06:46:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9a6e993f7b349405b6c8f9244cd9cf0f56a6a81
https://github.com/llvm/llvm-project/commit/c9a6e993f7b349405b6c8f9244cd9cf0f56a6a81
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
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 (#79660)
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