Skip to content

Commit 6990a19

Browse files
committed
Optimizer: rename GuaranteedPhiUpdater -> PhiUpdater
Because it now has the replacePhisWithIncomingValues utility, which works for all kind of phis.
1 parent 09a5a44 commit 6990a19

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ private func registerSwiftAnalyses() {
140140

141141
private func registerUtilities() {
142142
registerVerifier()
143-
registerGuaranteedPhiUpdater()
143+
registerPhiUpdater()
144144
}

SwiftCompilerSources/Sources/Optimizer/Utilities/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
swift_compiler_sources(Optimizer
1010
AccessUtilsTest.swift
1111
AddressUtils.swift
12-
GuaranteedPhiUpdater.swift
1312
BorrowUtils.swift
1413
SpecializationCloner.swift
1514
DiagnosticEngine.swift
@@ -22,6 +21,7 @@ swift_compiler_sources(Optimizer
2221
LocalVariableUtils.swift
2322
OptUtils.swift
2423
OwnershipLiveness.swift
24+
PhiUpdater.swift
2525
SSAUpdater.swift
2626
StaticInitCloner.swift
2727
Test.swift

SwiftCompilerSources/Sources/Optimizer/Utilities/GuaranteedPhiUpdater.swift renamed to SwiftCompilerSources/Sources/Optimizer/Utilities/PhiUpdater.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- GuaranteedPhiUpdater.swift ---------------------------------------===//
1+
//===--- PhiUpdater.swift -------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -237,8 +237,8 @@ func replacePhisWithIncomingValues(phis: [Phi], _ context: some MutatingContext)
237237
}
238238
}
239239

240-
func registerGuaranteedPhiUpdater() {
241-
BridgedUtilities.registerGuaranteedPhiUpdater(
240+
func registerPhiUpdater() {
241+
BridgedUtilities.registerPhiUpdater(
242242
// updateAllGuaranteedPhis
243243
{ (bridgedCtxt: BridgedPassContext, bridgedFunction: BridgedFunction) in
244244
let context = FunctionPassContext(_bridged: bridgedCtxt)

include/swift/SILOptimizer/OptimizerBridging.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ struct BridgedUtilities {
134134
typedef void (* _Nonnull UpdatePhisFn)(BridgedPassContext, BridgedArrayRef);
135135

136136
static void registerVerifier(VerifyFunctionFn verifyFunctionFn);
137-
static void registerGuaranteedPhiUpdater(UpdateFunctionFn updateBorrowedFromFn,
138-
UpdatePhisFn updateBorrowedFromPhisFn,
139-
UpdatePhisFn replacePhisWithIncomingValuesFn);
137+
static void registerPhiUpdater(UpdateFunctionFn updateBorrowedFromFn,
138+
UpdatePhisFn updateBorrowedFromPhisFn,
139+
UpdatePhisFn replacePhisWithIncomingValuesFn);
140140
};
141141

142142
struct BridgedBasicBlockSet {

lib/SILOptimizer/Utils/OwnershipOptUtils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,9 +1917,9 @@ static BridgedUtilities::UpdateFunctionFn updateAllGuaranteedPhisFunction;
19171917
static BridgedUtilities::UpdatePhisFn updateGuaranteedPhisFunction;
19181918
static BridgedUtilities::UpdatePhisFn replacePhisWithIncomingValuesFunction;
19191919

1920-
void BridgedUtilities::registerGuaranteedPhiUpdater(UpdateFunctionFn updateAllGuaranteedPhisFn,
1921-
UpdatePhisFn updateGuaranteedPhisFn,
1922-
UpdatePhisFn replacePhisWithIncomingValuesFn) {
1920+
void BridgedUtilities::registerPhiUpdater(UpdateFunctionFn updateAllGuaranteedPhisFn,
1921+
UpdatePhisFn updateGuaranteedPhisFn,
1922+
UpdatePhisFn replacePhisWithIncomingValuesFn) {
19231923
updateAllGuaranteedPhisFunction = updateAllGuaranteedPhisFn;
19241924
updateGuaranteedPhisFunction = updateGuaranteedPhisFn;
19251925
replacePhisWithIncomingValuesFunction = replacePhisWithIncomingValuesFn;

0 commit comments

Comments
 (0)