[PATCH] D125060: [amdgpu] Implement lds kernel id intrinsic
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 06:16:39 PDT 2022
JonChesterfield added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h:107
+ static ConstantInt *getLDSKernelIdMetadata(const Function &F);
+
----------------
arsenm wrote:
> Why not return the int value?
ConstantInt is the return type of mdconst::extract and this gives a cheap/lazy way to test for the metadata missing (returning nullptr). Replaced with std::optional<uint32_t> for more explicit/verbose uses at the call sites.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:2826
+ } else {
+ InputReg = DAG.getUNDEF(ArgVT);
+ }
----------------
arsenm wrote:
> This should get a test in abi-attribute-hints-undefined-behavior.ll
Added the clause, but obv no change to codegen as it lowers to undef on missing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125060/new/
https://reviews.llvm.org/D125060
More information about the llvm-commits
mailing list