Skip to content

Commit a6c4ce5

Browse files
IcohedronGreg Roth
andcommitted
Rename removeMemCpy to legalizeMemCpy
Co-authored-by: Greg Roth <[email protected]>
1 parent 426f0d3 commit a6c4ce5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,12 @@ static void emitMemsetExpansion(IRBuilder<> &Builder, Value *Dst, Value *Val,
352352
}
353353
}
354354

355-
static void removeMemCpy(Instruction &I,
356-
SmallVectorImpl<Instruction *> &ToRemove,
357-
DenseMap<Value *, Value *> &ReplacedValues) {
355+
// Expands the instruction `I` into corresponding loads and stores if it is a
356+
// memcpy call. In that case, the call instruction is added to the `ToRemove`
357+
// vector. `ReplacedValues` is unused.
358+
static void legalizeMemCpy(Instruction &I,
359+
SmallVectorImpl<Instruction *> &ToRemove,
360+
DenseMap<Value *, Value *> &ReplacedValues) {
358361

359362
CallInst *CI = dyn_cast<CallInst>(&I);
360363
if (!CI)
@@ -428,7 +431,7 @@ class DXILLegalizationPipeline {
428431
LegalizationPipeline.push_back(fixI8UseChain);
429432
LegalizationPipeline.push_back(downcastI64toI32InsertExtractElements);
430433
LegalizationPipeline.push_back(legalizeFreeze);
431-
LegalizationPipeline.push_back(removeMemCpy);
434+
LegalizationPipeline.push_back(legalizeMemCpy);
432435
LegalizationPipeline.push_back(removeMemSet);
433436
}
434437
};

0 commit comments

Comments
 (0)