Skip to content

Commit a15f083

Browse files
committed
Add clarifying comment.
1 parent 8543522 commit a15f083

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
374374
buildOpDecorate(VRegs[i][0], MIRBuilder,
375375
SPIRV::Decoration::FuncParamAttr, {Attr});
376376
}
377+
// TODO: the AMDGPU BE only supports ByRef argument passing, thus for
378+
// AMDGCN flavoured SPIRV we CodeGen for ByRef, but lower it to
379+
// ByVal, handling the impedance mismatch during reverse
380+
// translation from SPIRV to LLVM IR; the vendor check should be
381+
// removed once / if SPIRV adds ByRef support.
377382
if (Arg.hasAttribute(Attribute::ByVal) ||
378383
(Arg.hasAttribute(Attribute::ByRef) &&
379384
F.getParent()->getTargetTriple().getVendor() ==

0 commit comments

Comments
 (0)