[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 12:43:08 PDT 2022
jhuber6 added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9436
+ CGM.getModule(), Type, true,
+ llvm::GlobalValue::LinkageTypes::LinkOnceODRLinkage,
+ llvm::ConstantInt::get(Type, Value), Name, nullptr,
----------------
yaxunl wrote:
> This does not support per-TU control variables. Probably should use internal linkage.
The AMDGPU device libraries use `linkone_odr` so I figured it was the most appropriate here. It should mean that we can have multiple identical definitions and they don't clash. There's also no requirement for these to be emitted as symbols AFAIK.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130096/new/
https://reviews.llvm.org/D130096
More information about the cfe-commits
mailing list