[clang] [Clang][AMDGPU] Avoid Using `byval` for `ndrange_t` when emitting `__enqueue_kernel_basic` (PR #116435)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 12:36:39 PST 2024
================
@@ -5985,10 +5985,14 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
llvm::Value *Block =
Builder.CreatePointerCast(Info.BlockArg, GenericVoidPtrTy);
- AttrBuilder B(Builder.getContext());
- B.addByValAttr(NDRangeL.getAddress().getElementType());
- llvm::AttributeList ByValAttrSet =
- llvm::AttributeList::get(CGM.getModule().getContext(), 3U, B);
+ llvm::AttributeList ByValAttrSet;
+ // AMDGPU doesn't use byval for struct argument.
----------------
shiltian wrote:
In fact, the other `__enqueue_kernel*` functions don't have this at all. I removed the code directly to align with others. It might be quite complicated to try to get `ABIArgInfo` here.
https://github.com/llvm/llvm-project/pull/116435
More information about the cfe-commits
mailing list