Skip to content

Commit 1401b31

Browse files
authored
Merge pull request #75028 from Sajjon/cyon_typo_batch__test__SILOptimizer
Typos: `test/SILOptimizer`
2 parents a3e0b17 + de9e50f commit 1401b31

21 files changed

+39
-39
lines changed

test/SILOptimizer/abcopt_large_cfg.sil.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bb0(%0: $Int32, %1: $Bool, %2: @owned $ArrayInt):
3232

3333
// CHECK-LABEL: sil [ossa] @test_very_deep_domtree :
3434

35-
// Currently there is nothing ot check here, because the optimization bails in
35+
// Currently there is nothing to check here, because the optimization bails in
3636
// this case.
3737
// In future we might check that even with a deep domtree it can hoist the check.
3838

test/SILOptimizer/access_storage_analysis.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ bb3(%7 : $Builtin.RawPointer):
690690
return %10 : $Int64
691691
}
692692

693-
// Test storage for SIL global variable declations.
693+
// Test storage for SIL global variable declarations.
694694

695695
sil_global hidden @testGlobal : $Builtin.Int64
696696

test/SILOptimizer/address_lowering.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ bb0(%error_exi : @guaranteed $any Error):
11271127
}
11281128

11291129
// Test a chain of projections multiple nodes of which feature an opened
1130-
// archetype AND the archetype-definining instruction for the first projection
1130+
// archetype AND the archetype-defining instruction for the first projection
11311131
// whose type has an opened archetype dominates all blocks but the
11321132
// archetype-defining instruction for the SECOND projection does not.
11331133
//

test/SILOptimizer/address_lowering_phi.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ merge(%sp : @owned $Pair<T>):
858858
// ^^^ ^^^ ^^^
859859
// %s projects out of %s2's storage
860860
// ^^^ ^^^
861-
// %box projects out of %s's strorage
861+
// %box projects out of %s's storage
862862
// ^^^
863863
// %t projects out of %box's storage
864864
// There is no interference (and only one incoming phi.)
@@ -911,7 +911,7 @@ exit:
911911
// ^^^ ^^^ ^^^
912912
// %s projects out of %s2's storage
913913
// ^^^ ^^^
914-
// %box projects out of %s's strorage
914+
// %box projects out of %s's storage
915915
// ^^^
916916
// %t projects out of %box's storage
917917
// There is interference of the _def_ projection (which can only be detected by

test/SILOptimizer/capture_propagation.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ bb0(%0 : $Builtin.Int32, %1 : $Builtin.FPIEEE32, %2 : $Builtin.RawPointer, %3 :
392392
// CHECK: %[[CONVERTED:[0-9]+]] = thin_to_thick_function %[[FR]] : $@convention(thin) () -> () to $@callee_owned () -> ()
393393
// CHECK-NOT: partial_apply
394394
// CHECK: apply %[[CALLEE]](%[[CONVERTED]]) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
395-
// CHECL-NOT: partial_apply
395+
// CHECK-NOT: partial_apply
396396
// CHECK: return
397397
sil @test_generic_capture_propagation2_caller : $@convention(thin) () -> () {
398398
%0 = integer_literal $Builtin.Int32, 0

test/SILOptimizer/devirt_generic_witness_method.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : $Dictionary<String, Any>, %2 : $@thick Item.Type):
2929
return %6 : $()
3030
}
3131

32-
// Check that it is possible to devirtualize a partial_appy of a generic witness_method.
32+
// Check that it is possible to devirtualize a partial_apply of a generic witness_method.
3333
// Since it is a derived class that invokes an implementation from a base class,
3434
// make sure that the resulting closure is properly converted into a required type.
3535

test/SILOptimizer/devirt_generic_witness_method_ownership.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : @owned $Dictionary<String, Any>, %2 : $@thick Item.Type):
2929
return %6 : $()
3030
}
3131

32-
// Check that it is possible to devirtualize a partial_appy of a generic witness_method.
32+
// Check that it is possible to devirtualize a partial_apply of a generic witness_method.
3333
// Since it is a derived class that invokes an implementation from a base class,
3434
// make sure that the resulting closure is properly converted into a required type.
3535

test/SILOptimizer/forwarding_utils.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ entry(%0 : @owned $C, %1 : @owned $C):
5151
return %void : $()
5252
}
5353

54-
// In opaque SIL values mode, handle the tuple_pack_extract forwaded operand.
54+
// In opaque SIL values mode, handle the tuple_pack_extract forwarded operand.
5555
//
5656
// CHECK-LABEL: begin running test 1 of 2 on tuplePackExtractTest: forwarding_def_use_test with: %tuple
5757
// CHECK: USE: operand #0 of end_borrow %1 : $(repeat each T)
@@ -79,7 +79,7 @@ entry(%tuple_addr : $*(repeat each T)):
7979
return %retval : $()
8080
}
8181

82-
// Handle forwaded guaranteed values.
82+
// Handle forwarded guaranteed values.
8383
//
8484
// CHECK-LABEL: begin running test 1 of 2 on forwardingGuaranteedTest: forwarding_def_use_test with: %0
8585
// CHECK: USE: dead value: %5 = tuple (%3 : $C, %4 : $C)
@@ -211,7 +211,7 @@ bbExit:
211211
return %void : $()
212212
}
213213

214-
// Chain of owned values. Needs to resolve in a resonable amount of time.
214+
// Chain of owned values. Needs to resolve in a reasonable amount of time.
215215
//
216216
// CHECK-LABEL: begin running test 1 of 2 on forwardingTuplesTest: forwarding_def_use_test with: %0
217217
// CHECK: USE: operand #0 of destroy_value %{{.*}} : $(C, C)

test/SILOptimizer/hoist_destroy_addr.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ entry(%in_addr : $*X):
590590
return %retval : $X
591591
}
592592

593-
// If a begin_apply uses the address, the end_appy and abort_apply should be
593+
// If a begin_apply uses the address, the end_apply and abort_apply should be
594594
// regarded as uses too. Don't hoist over them.
595595
//
596596
// CHECK-LABEL: sil [ossa] @nohoist_over_end_apply_use : {{.*}} {

test/SILOptimizer/init_accessors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct TestNoInitAndInit {
185185

186186
var pointX: Int {
187187
@storageRestrictions(accesses: x)
188-
init(initalValue) {
188+
init(initialValue) {
189189
}
190190

191191
get { x }

test/SILOptimizer/let-property-lowering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class C {
6868
// CHECK: store {{.*}} to [[A]] : $*Int
6969
// CHECK: [[EI:%.*]] = end_init_let_ref %1
7070
// CHECK: bb1:
71-
// CHEKC: ref_element_addr [[EI]] : $C, #C.b
71+
// CHECK: ref_element_addr [[EI]] : $C, #C.b
7272
// CHECK: return [[EI]]
7373
// CHECK: } // end sil function '$s4test1CC1cACSb_tcfc'
7474
init(c: Bool) {

test/SILOptimizer/licm.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public protocol P : class {
226226
}
227227

228228
// Check that LICM does not hoist a metatype instruction before
229-
// the open_existential instruction which creates the archtype,
229+
// the open_existential instruction which creates the archetype,
230230
// because this would break the dominance relation between them.
231231
// CHECK-LABEL: sil @dont_hoist_metatype
232232
// CHECK-NOT: metatype
@@ -1096,7 +1096,7 @@ bb3:
10961096
}
10971097

10981098
// Test multiple stores to disjoint access paths with a single load
1099-
// that spans both of them. The load should be split and hosited and
1099+
// that spans both of them. The load should be split and hoisted and
11001100
// and the stores be sunk.
11011101
// testCommonSplitLoad
11021102
// CHECK-LABEL: sil shared @testCommonSplitLoad : $@convention(method) (Int64, Builtin.RawPointer) -> (Int64, Int64, Int64) {

test/SILOptimizer/moveonly_addresschecker.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ sil @end_addr_see_addr : $@convention(thin) (@in M, @in_guaranteed M) -> ()
616616
/// A single instruction, apply @end_addr_see_addr, consumes one field and
617617
/// borrows another.
618618

619-
/// Varify that the consumed value isn't destroyed twice and that the borrowed
619+
/// Verify that the consumed value isn't destroyed twice and that the borrowed
620620
/// value isn't destroyed before it's used.
621621
///
622622
/// Note: This test case doesn't have valid SIL (#M2.s1 is consumed twice), but

test/SILOptimizer/opaque_values_Onone.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ func doit<T>(_ f: () -> T) -> T {
7171
// CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(Value, Value)
7272
// CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_
7373
// CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]<Value>([[INSTANCE_ADDR_IN]])
74-
// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value
75-
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]]
74+
// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value
75+
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]]
7676
// CHECK: apply {{%[^,]+}}<(Value, Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]])
7777
// CHECK-LABEL: } // end sil function 'duplicate1'
7878
// CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_ : {{.*}} {
@@ -93,8 +93,8 @@ func duplicate1<Value>(value: Value) -> (Value, Value) {
9393
// CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(one: Value, two: Value)
9494
// CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_
9595
// CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]<Value>([[INSTANCE_ADDR_IN]])
96-
// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value
97-
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]]
96+
// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value
97+
// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]]
9898
// CHECK: apply {{%[^,]+}}<(one: Value, two: Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]])
9999
// CHECK-LABEL: } // end sil function 'duplicate2'
100100
// CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_ : {{.*}} {

test/SILOptimizer/side_effects.sil

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,12 @@ bb0(%0 : @owned $SP):
447447
return %0 : $SP
448448
}
449449

450-
// CHECK-LABEL: sil [ossa] @store_destoys
450+
// CHECK-LABEL: sil [ossa] @store_destroys
451451
// CHECK-NEXT: [%0: read v**, write v**, destroy v**]
452452
// CHECK-NEXT: [%1: write c*.v**, copy c*.v**]
453453
// CHECK-NEXT: [global: write,copy]
454454
// CHECK-NEXT: {{^[^[]}}
455-
sil [ossa] @store_destoys : $@convention(thin) (@inout X, @owned X) -> () {
455+
sil [ossa] @store_destroys : $@convention(thin) (@inout X, @owned X) -> () {
456456
bb0(%0 : $*X, %1 : @owned $X):
457457
store %1 to [assign] %0 : $*X
458458
%2 = tuple ()
@@ -482,24 +482,24 @@ bb0(%0 : $*X, %1 : @owned $X):
482482
return %2 : $()
483483
}
484484

485-
// CHECK-LABEL: sil [ossa] @copy_destoys
485+
// CHECK-LABEL: sil [ossa] @copy_destroys
486486
// CHECK-NEXT: [%0: read v**, write v**, destroy v**]
487487
// CHECK-NEXT: [%1: read v**, copy v**]
488488
// CHECK-NEXT: [global: write,copy]
489489
// CHECK-NEXT: {{^[^[]}}
490-
sil [ossa] @copy_destoys : $@convention(thin) (@inout X, @in_guaranteed X) -> () {
490+
sil [ossa] @copy_destroys : $@convention(thin) (@inout X, @in_guaranteed X) -> () {
491491
bb0(%0 : $*X, %1 : $*X):
492492
copy_addr %1 to %0 : $*X
493493
%2 = tuple ()
494494
return %2 : $()
495495
}
496496

497-
// CHECK-LABEL: sil [ossa] @copy_doesnt_destoy
497+
// CHECK-LABEL: sil [ossa] @copy_doesnt_destroy
498498
// CHECK-NEXT: [%0: write v**]
499499
// CHECK-NEXT: [%1: read v**, copy v**]
500500
// CHECK-NEXT: [global: ]
501501
// CHECK-NEXT: {{^[^[]}}
502-
sil [ossa] @copy_doesnt_destoy : $@convention(thin) (@in_guaranteed X) -> @out X {
502+
sil [ossa] @copy_doesnt_destroy : $@convention(thin) (@in_guaranteed X) -> @out X {
503503
bb0(%0 : $*X, %1 : $*X):
504504
copy_addr %1 to [init] %0 : $*X
505505
%2 = tuple ()

test/SILOptimizer/sil_combine_concrete_existential.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ extension MyObject : SubscriptionViewControllerDelegate { }
660660

661661
sil @callee2 : $@convention(thin) <τ_0_0 where τ_0_0 : SubscriptionViewControllerDelegate> (@in τ_0_0, @thick SubscriptionViewControllerBuilder.Type) -> @owned SubscriptionViewControllerBuilder
662662

663-
// CHECK: sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () {
663+
// CHECK: sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () {
664664
// CHECK: bb0([[ARG:%.*]] : $any ResourceKitProtocol, [[ARG2:%.*]] : $ViewController):
665665
// CHECK: [[T1:%.*]] = metatype $@thick SubscriptionViewControllerBuilder.Type
666666
// CHECK: [[T2:%.*]] = open_existential_ref [[ARG]] : $any ResourceKitProtocol to $@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", any ResourceKitProtocol) Self
@@ -674,7 +674,7 @@ sil @callee2 : $@convention(thin) <τ_0_0 where τ_0_0 : SubscriptionViewControl
674674
// CHECK: (normal_conformance type="MyObject" protocol="SubscriptionViewControllerDelegate"
675675
// CHECK: apply [[T5]]<@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", any ResourceKitProtocol) Self>([[T6]], [[T1]])
676676

677-
sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () {
677+
sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () {
678678
bb0(%0 : $ResourceKitProtocol, %1 : $ViewController):
679679
%4 = metatype $@thick SubscriptionViewControllerBuilder.Type
680680
%5 = open_existential_ref %0 : $ResourceKitProtocol to $@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", ResourceKitProtocol) Self

test/SILOptimizer/simplify_begin_borrow.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ bb0(%0 : @owned $C):
341341
return %0 : $C
342342
}
343343

344-
// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_differnt_bb :
344+
// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_different_bb :
345345
// CHECK: begin_borrow
346-
// CHECK: } // end sil function 'dont_replace_copy_in_differnt_bb'
347-
sil [ossa] @dont_replace_copy_in_differnt_bb : $@convention(thin) (@owned C) -> @owned C {
346+
// CHECK: } // end sil function 'dont_replace_copy_in_different_bb'
347+
sil [ossa] @dont_replace_copy_in_different_bb : $@convention(thin) (@owned C) -> @owned C {
348348
bb0(%0 : @owned $C):
349349
%1 = begin_borrow %0 : $C
350350
cond_br undef, bb1, bb2

test/SILOptimizer/simplify_cfg_checkcast.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ bb7:
538538
// Introduce a copy for the new lifetime.
539539
// Simplify down to a single diamond.
540540
//
541-
// TODO: Simplify some of the obvisouly dead copy/destroy/borrows
541+
// TODO: Simplify some of the obviously dead copy/destroy/borrows
542542
// on-the-fly after each simplify-cfg. Possible using CanonicalizeOSSALifetime.
543543
//
544544
// TODO-CHECK-LABEL: sil [ossa] @redundant_checked_cast_br_rauw_guaranteed_to_owned_merge : $@convention(method) (@owned Base) -> () {

test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ sil @test_simple_jump_thread_clone_partial_apply_take_closure : $@convention(thi
194194
// CHECK: partial_apply [callee_guaranteed]
195195
// CHECK-NEXT: mark_dependence
196196
// CHECK-NEXT: begin_borrow [lexical]
197-
// CHECK-NOT: partial_apply [callee_guaranted]
197+
// CHECK-NOT: partial_apply [callee_guaranteed]
198198
// CHECK-NOT: begin_borrow
199199
// CHECK-LABEL: } // end sil function 'test_simple_jump_thread_clone_partial_apply'
200200
sil [ossa] @test_simple_jump_thread_clone_partial_apply : $@convention(thin) (@owned Klass, @inout Klass) -> Builtin.Int1 {

test/SILOptimizer/specialize_opaque_type_archetypes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ public func testResilientInlinableProperty2() {
364364
}
365365

366366
// CHECK-LABEL: sil @$s1A035testResilientInlinablePropertyCallsbC0yyF : $@convention(thin) () -> () {
367-
// CHECK: [[CONTAINTER:%.*]] = alloc_stack [var_decl] $ResilientContainer2
367+
// CHECK: [[CONTAINER:%.*]] = alloc_stack [var_decl] $ResilientContainer2
368368
// CHECK: [[RES:%.*]] = alloc_stack $Int64
369369
// CHECK: [[FUN:%.*]] = function_ref @$s9External319ResilientContainer2V023inlineablePropertyCallsB10InlineableQrvg
370-
// CHECK: apply [[FUN]]([[RES]], [[CONTAINTER]])
370+
// CHECK: apply [[FUN]]([[RES]], [[CONTAINER]])
371371
public func testResilientInlinablePropertyCallsResilientInlinable() {
372372
let r = ResilientContainer2()
373373
useP(r.inlineablePropertyCallsResilientInlineable.myValue3())

test/SILOptimizer/stack_protection.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public func overflowWithUnsafeBytes() {
3636
}
3737
}
3838

39-
// CHECK-LABEL: sil [stack_protection] @$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF
39+
// CHECK-LABEL: sil [stack_protection] @$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF
4040
// CHECK-NOT: copy_addr
41-
// CHECK: } // end sil function '$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF'
42-
public func owerflowWithUnsafeBorrowedBytes(value: Int) {
41+
// CHECK: } // end sil function '$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF'
42+
public func overflowWithUnsafeBorrowedBytes(value: Int) {
4343
withUnsafeBytes(of: value) {
4444
potentiallyBadCFunction($0.bindMemory(to: Int.self).baseAddress!)
4545
}

0 commit comments

Comments
 (0)