Skip to content

Commit 3f95ce9

Browse files
committed
Optimizer: fix spelling of the Simplifiable protocol
Rename `Simplifyable` -> `Simplifiable` NFC
1 parent d25eba2 commit 3f95ce9

35 files changed

+53
-53
lines changed

SwiftCompilerSources/Sources/Optimizer/FunctionPasses/SimplificationPasses.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ import SIL
1717
//===--------------------------------------------------------------------===//
1818

1919
/// Instructions which can be simplified at all optimization levels
20-
protocol Simplifyable : Instruction {
20+
protocol Simplifiable : Instruction {
2121
func simplify(_ context: SimplifyContext)
2222
}
2323

2424
/// Instructions which can be simplified at -Onone
25-
protocol OnoneSimplifyable : Simplifyable {
25+
protocol OnoneSimplifiable : Simplifiable {
2626
}
2727

2828
/// Instructions which can only be simplified at the end of the -Onone pipeline
29-
protocol LateOnoneSimplifyable : Instruction {
29+
protocol LateOnoneSimplifiable : Instruction {
3030
func simplifyLate(_ context: SimplifyContext)
3131
}
3232

@@ -38,7 +38,7 @@ let ononeSimplificationPass = FunctionPass(name: "onone-simplification") {
3838
(function: Function, context: FunctionPassContext) in
3939

4040
runSimplification(on: function, context, preserveDebugInfo: true) {
41-
if let i = $0 as? OnoneSimplifyable {
41+
if let i = $0 as? OnoneSimplifiable {
4242
i.simplify($1)
4343
}
4444
}
@@ -48,7 +48,7 @@ let simplificationPass = FunctionPass(name: "simplification") {
4848
(function: Function, context: FunctionPassContext) in
4949

5050
runSimplification(on: function, context, preserveDebugInfo: false) {
51-
if let i = $0 as? Simplifyable {
51+
if let i = $0 as? Simplifiable {
5252
i.simplify($1)
5353
}
5454
}
@@ -58,9 +58,9 @@ let lateOnoneSimplificationPass = FunctionPass(name: "late-onone-simplification"
5858
(function: Function, context: FunctionPassContext) in
5959

6060
runSimplification(on: function, context, preserveDebugInfo: true) {
61-
if let i = $0 as? LateOnoneSimplifyable {
61+
if let i = $0 as? LateOnoneSimplifiable {
6262
i.simplifyLate($1)
63-
} else if let i = $0 as? OnoneSimplifyable {
63+
} else if let i = $0 as? OnoneSimplifiable {
6464
i.simplify($1)
6565
}
6666
}

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyAllocRefDynamic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension AllocRefDynamicInst : OnoneSimplifyable {
15+
extension AllocRefDynamicInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
/// Optimize alloc_ref_dynamic of a known type to alloc_ref:
1818
///

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyApply.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension ApplyInst : OnoneSimplifyable {
15+
extension ApplyInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
if tryTransformThickToThinCallee(of: self, context) {
1818
return
@@ -25,13 +25,13 @@ extension ApplyInst : OnoneSimplifyable {
2525
}
2626
}
2727

28-
extension TryApplyInst : OnoneSimplifyable {
28+
extension TryApplyInst : OnoneSimplifiable {
2929
func simplify(_ context: SimplifyContext) {
3030
_ = context.tryDevirtualize(apply: self, isMandatory: false)
3131
}
3232
}
3333

34-
extension BeginApplyInst : OnoneSimplifyable {
34+
extension BeginApplyInst : OnoneSimplifiable {
3535
func simplify(_ context: SimplifyContext) {
3636
_ = context.tryDevirtualize(apply: self, isMandatory: false)
3737
}

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBeginAndLoadBorrow.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension BeginBorrowInst : OnoneSimplifyable, SILCombineSimplifyable {
15+
extension BeginBorrowInst : OnoneSimplifiable, SILCombineSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
if borrowedValue.ownership == .owned,
1818
// We need to keep lexical lifetimes in place.
@@ -27,7 +27,7 @@ extension BeginBorrowInst : OnoneSimplifyable, SILCombineSimplifyable {
2727
}
2828
}
2929

30-
extension LoadBorrowInst : Simplifyable, SILCombineSimplifyable {
30+
extension LoadBorrowInst : Simplifiable, SILCombineSimplifiable {
3131
func simplify(_ context: SimplifyContext) {
3232
if uses.ignoreDebugUses.ignoreUsers(ofType: EndBorrowInst.self).isEmpty {
3333
context.erase(instructionIncludingAllUsers: self)

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBeginCOWMutation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension BeginCOWMutationInst : Simplifyable, SILCombineSimplifyable {
15+
extension BeginCOWMutationInst : Simplifiable, SILCombineSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717

1818
/// The buffer of an empty Array/Set/Dictionary singleton is known to be not

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBranch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension BranchInst : OnoneSimplifyable {
15+
extension BranchInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
tryMergeWithTargetBlock(context)
1818
}

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBuiltin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension BuiltinInst : OnoneSimplifyable {
15+
extension BuiltinInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
switch id {
1818
case .IsConcrete:
@@ -62,7 +62,7 @@ extension BuiltinInst : OnoneSimplifyable {
6262
}
6363
}
6464

65-
extension BuiltinInst : LateOnoneSimplifyable {
65+
extension BuiltinInst : LateOnoneSimplifiable {
6666
func simplifyLate(_ context: SimplifyContext) {
6767
if id == .IsConcrete {
6868
// At the end of the pipeline we can be sure that the isConcrete's type doesn't get "more" concrete.

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyCheckedCast.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension CheckedCastAddrBranchInst : OnoneSimplifyable {
15+
extension CheckedCastAddrBranchInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
guard let castWillSucceed = self.dynamicCastResult else {
1818
return

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyClassifyBridgeObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import AST
1414
import SIL
1515

16-
extension ClassifyBridgeObjectInst : OnoneSimplifyable, SILCombineSimplifyable {
16+
extension ClassifyBridgeObjectInst : OnoneSimplifiable, SILCombineSimplifiable {
1717
func simplify(_ context: SimplifyContext) {
1818
// Constant fold `classify_bridge_object` to `(false, false)` if the operand is known
1919
// to be a swift class.

SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyCondBranch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SIL
1414

15-
extension CondBranchInst : OnoneSimplifyable {
15+
extension CondBranchInst : OnoneSimplifiable {
1616
func simplify(_ context: SimplifyContext) {
1717
tryConstantFold(context)
1818
}

0 commit comments

Comments
 (0)