Skip to content

Commit 6ab934d

Browse files
committed
Add comment explaining CopyElemsImpl function
1 parent b96adb5 commit 6ab934d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/DirectX/DXILCBufferAccess.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ static void replaceMemCpy(MemCpyInst *MCI, CBufferResource &CBR,
235235
IRBuilder<> Builder(MCI);
236236
CBR.createAndSetCurrentHandle(Builder);
237237

238+
// This function recursively copies N array elements from the CBuffer Resource
239+
// to the MemCpy Destination. Recursion is used to unravel multidimensional
240+
// arrays into a sequence of scalar/vector extracts and stores.
238241
auto CopyElemsImpl = [&Builder, &MCI, &Name, &CBR,
239242
&DL](const auto &Self, ArrayType *ArrTy,
240243
size_t ArrOffset, size_t N) -> void {

0 commit comments

Comments
 (0)