Skip to content

Commit ec50d03

Browse files
committed
[ownership] Rename OwnershipFixupContext::replaceAllUsesAndErase{FixingOwnership,}.
The class name is already OwnershipFixupContext... why do we need to include FixingOwnership in its helpers... its redundant.
1 parent 90f3846 commit ec50d03

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Diff for: include/swift/SILOptimizer/Utils/OwnershipOptUtils.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ struct OwnershipFixupContext {
4545
deBlocks(deBlocks), jointPostDomSetComputer(inputJPDComputer) {}
4646

4747
SILBasicBlock::iterator
48-
replaceAllUsesAndEraseFixingOwnership(SingleValueInstruction *oldValue,
49-
SILValue newValue);
48+
replaceAllUsesAndErase(SingleValueInstruction *oldValue, SILValue newValue);
5049

5150
/// We can not RAUW all old values with new values.
5251
///

Diff for: lib/SILOptimizer/Analysis/SimplifyInstruction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ swift::replaceAllSimplifiedUsesAndErase(SILInstruction *i, SILValue result,
780780
if (svi->getFunction()->hasOwnership()) {
781781
JointPostDominanceSetComputer computer(*deadEndBlocks);
782782
OwnershipFixupContext ctx{callbacks, *deadEndBlocks, computer};
783-
return ctx.replaceAllUsesAndEraseFixingOwnership(svi, result);
783+
return ctx.replaceAllUsesAndErase(svi, result);
784784
}
785785
return replaceAllUsesAndErase(svi, result, callbacks);
786786
}

Diff for: lib/SILOptimizer/Transforms/CSE.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ bool CSE::processNode(DominanceInfoNode *Node) {
10231023
cast<SingleValueInstruction>(AvailInst)))
10241024
continue;
10251025
// Replace SingleValueInstruction using OSSA RAUW here
1026-
nextI = FixupCtx.replaceAllUsesAndEraseFixingOwnership(
1026+
nextI = FixupCtx.replaceAllUsesAndErase(
10271027
cast<SingleValueInstruction>(Inst),
10281028
cast<SingleValueInstruction>(AvailInst));
10291029
Changed = true;

Diff for: lib/SILOptimizer/Utils/OwnershipOptUtils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,8 @@ bool OwnershipFixupContext::canFixUpOwnershipForRAUW(
759759
}
760760

761761
SILBasicBlock::iterator
762-
OwnershipFixupContext::replaceAllUsesAndEraseFixingOwnership(
763-
SingleValueInstruction *oldValue, SILValue newValue) {
762+
OwnershipFixupContext::replaceAllUsesAndErase(SingleValueInstruction *oldValue,
763+
SILValue newValue) {
764764
OwnershipRAUWUtility utility{oldValue, newValue, *this};
765765
return utility.perform();
766766
}

0 commit comments

Comments
 (0)