SILCloner: rename 'remapValue' to 'getMappedValue' to avoid confusion.

A follow up commit adds an API for SILCloner clients to set mapped
values. Calling the map lookup "remap" would be unacceptably misleading.
This commit is contained in:
Andrew Trick
2018-10-26 23:06:57 -07:00
parent 077757858b
commit 2aa8427dc6
11 changed files with 27 additions and 28 deletions

View File

@@ -1579,7 +1579,7 @@ protected:
}
}
SILValue remapValue(SILValue V) {
SILValue getMappedValue(SILValue V) {
if (auto *BB = V->getParentBlock()) {
if (!DomTree.dominates(StartBB, BB)) {
// Must be a value that dominates the start basic block.
@@ -1588,7 +1588,7 @@ protected:
return V;
}
}
return SILCloner<RegionCloner>::remapValue(V);
return SILCloner<RegionCloner>::getMappedValue(V);
}
void postProcess(SILInstruction *Orig, SILInstruction *Cloned) {
@@ -1610,7 +1610,7 @@ protected:
// Update SSA form.
SSAUp.Initialize(V->getType());
SSAUp.AddAvailableValue(OrigBB, V);
SILValue NewVal = remapValue(V);
SILValue NewVal = getMappedValue(V);
SSAUp.AddAvailableValue(getOpBasicBlock(OrigBB), NewVal);
for (auto U : UseList) {
Operand *Use = U;