From 18e1f801f91d58a00a5172a2f8cd9037be234212 Mon Sep 17 00:00:00 2001 From: Alexander Cyon Date: Sat, 6 Jul 2024 13:28:07 +0200 Subject: [PATCH 1/2] [test/SILOptimizer] Fix typos --- test/SILOptimizer/abcopt_large_cfg.sil.gyb | 2 +- test/SILOptimizer/access_enforcement_selection.sil | 4 ++-- test/SILOptimizer/access_storage_analysis.sil | 2 +- test/SILOptimizer/address_lowering.sil | 2 +- test/SILOptimizer/address_lowering_phi.sil | 4 ++-- test/SILOptimizer/capture_propagation.sil | 2 +- test/SILOptimizer/devirt_generic_witness_method.sil | 2 +- .../devirt_generic_witness_method_ownership.sil | 2 +- .../dictionary_lookup_with_default.swift | 2 +- test/SILOptimizer/exclusivity_static_diagnostics.sil | 2 +- test/SILOptimizer/forwarding_utils.sil | 6 +++--- test/SILOptimizer/function_uses.sil | 2 +- test/SILOptimizer/hoist_destroy_addr.sil | 2 +- test/SILOptimizer/init_accessors.swift | 2 +- test/SILOptimizer/let-property-lowering.swift | 2 +- test/SILOptimizer/licm.sil | 4 ++-- test/SILOptimizer/moveonly_addresschecker.sil | 2 +- test/SILOptimizer/opaque_values_Onone.swift | 8 ++++---- test/SILOptimizer/side_effects.sil | 12 ++++++------ .../sil_combine_concrete_existential.sil | 4 ++-- test/SILOptimizer/simplify_begin_borrow.sil | 6 +++--- test/SILOptimizer/simplify_cfg_checkcast.sil | 2 +- .../simplify_cfg_ossa_jump_threading.sil | 4 ++-- .../specialize_opaque_type_archetypes.swift | 4 ++-- test/SILOptimizer/stack_protection.swift | 6 +++--- 25 files changed, 45 insertions(+), 45 deletions(-) diff --git a/test/SILOptimizer/abcopt_large_cfg.sil.gyb b/test/SILOptimizer/abcopt_large_cfg.sil.gyb index a2d2db24ef130..50cf95d51b0f5 100644 --- a/test/SILOptimizer/abcopt_large_cfg.sil.gyb +++ b/test/SILOptimizer/abcopt_large_cfg.sil.gyb @@ -32,7 +32,7 @@ bb0(%0: $Int32, %1: $Bool, %2: @owned $ArrayInt): // CHECK-LABEL: sil [ossa] @test_very_deep_domtree : -// Currently there is nothing ot check here, because the optimization bails in +// Currently there is nothing to check here, because the optimization bails in // this case. // In future we might check that even with a deep domtree it can hoist the check. diff --git a/test/SILOptimizer/access_enforcement_selection.sil b/test/SILOptimizer/access_enforcement_selection.sil index a9654b7c126af..f0aa02766dde4 100644 --- a/test/SILOptimizer/access_enforcement_selection.sil +++ b/test/SILOptimizer/access_enforcement_selection.sil @@ -67,7 +67,7 @@ sil [ossa] @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @gu sil [ossa] @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () // Test static enforcement of box addresses that escape via closure -// partial_applys. +// partial_applies. // application. // CHECK-LABEL: sil hidden [ossa] @escapeAsArgumentToPartialApply : $@convention(thin) () -> () { // CHECK: bb0: @@ -99,7 +99,7 @@ bb0: return %9 : $() } -sil [dynamically_replacable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () +sil [dynamically_replaceable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () // Make sure that we handle dynamic_function_ref. sil hidden [ossa] @escapeAsArgumentToPartialApplyDynamic : $@convention(thin) () -> () { diff --git a/test/SILOptimizer/access_storage_analysis.sil b/test/SILOptimizer/access_storage_analysis.sil index c02d2827e6ac7..2894ce1532c22 100644 --- a/test/SILOptimizer/access_storage_analysis.sil +++ b/test/SILOptimizer/access_storage_analysis.sil @@ -690,7 +690,7 @@ bb3(%7 : $Builtin.RawPointer): return %10 : $Int64 } -// Test storage for SIL global variable declations. +// Test storage for SIL global variable declarations. sil_global hidden @testGlobal : $Builtin.Int64 diff --git a/test/SILOptimizer/address_lowering.sil b/test/SILOptimizer/address_lowering.sil index 264cf2d8e93b6..ac28fbd15d378 100644 --- a/test/SILOptimizer/address_lowering.sil +++ b/test/SILOptimizer/address_lowering.sil @@ -1127,7 +1127,7 @@ bb0(%error_exi : @guaranteed $any Error): } // Test a chain of projections multiple nodes of which feature an opened -// archetype AND the archetype-definining instruction for the first projection +// archetype AND the archetype-defining instruction for the first projection // whose type has an opened archetype dominates all blocks but the // archetype-defining instruction for the SECOND projection does not. // diff --git a/test/SILOptimizer/address_lowering_phi.sil b/test/SILOptimizer/address_lowering_phi.sil index 77b42566272f1..c81c298f593bc 100644 --- a/test/SILOptimizer/address_lowering_phi.sil +++ b/test/SILOptimizer/address_lowering_phi.sil @@ -858,7 +858,7 @@ merge(%sp : @owned $Pair): // ^^^ ^^^ ^^^ // %s projects out of %s2's storage // ^^^ ^^^ -// %box projects out of %s's strorage +// %box projects out of %s's storage // ^^^ // %t projects out of %box's storage // There is no interference (and only one incoming phi.) @@ -911,7 +911,7 @@ exit: // ^^^ ^^^ ^^^ // %s projects out of %s2's storage // ^^^ ^^^ -// %box projects out of %s's strorage +// %box projects out of %s's storage // ^^^ // %t projects out of %box's storage // There is interference of the _def_ projection (which can only be detected by diff --git a/test/SILOptimizer/capture_propagation.sil b/test/SILOptimizer/capture_propagation.sil index b7fc978f099be..2d2e6a0347030 100644 --- a/test/SILOptimizer/capture_propagation.sil +++ b/test/SILOptimizer/capture_propagation.sil @@ -392,7 +392,7 @@ bb0(%0 : $Builtin.Int32, %1 : $Builtin.FPIEEE32, %2 : $Builtin.RawPointer, %3 : // CHECK: %[[CONVERTED:[0-9]+]] = thin_to_thick_function %[[FR]] : $@convention(thin) () -> () to $@callee_owned () -> () // CHECK-NOT: partial_apply // CHECK: apply %[[CALLEE]](%[[CONVERTED]]) : $@convention(thin) (@owned @callee_owned () -> ()) -> () -// CHECL-NOT: partial_apply +// CHECK-NOT: partial_apply // CHECK: return sil @test_generic_capture_propagation2_caller : $@convention(thin) () -> () { %0 = integer_literal $Builtin.Int32, 0 diff --git a/test/SILOptimizer/devirt_generic_witness_method.sil b/test/SILOptimizer/devirt_generic_witness_method.sil index 60d30710b13ab..f1f17a438cc87 100644 --- a/test/SILOptimizer/devirt_generic_witness_method.sil +++ b/test/SILOptimizer/devirt_generic_witness_method.sil @@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : $Dictionary, %2 : $@thick Item.Type): return %6 : $() } -// Check that it is possible to devirtualize a partial_appy of a generic witness_method. +// Check that it is possible to devirtualize a partial_apply of a generic witness_method. // Since it is a derived class that invokes an implementation from a base class, // make sure that the resulting closure is properly converted into a required type. diff --git a/test/SILOptimizer/devirt_generic_witness_method_ownership.sil b/test/SILOptimizer/devirt_generic_witness_method_ownership.sil index 7698a917cd1ce..5c2ef88856d83 100644 --- a/test/SILOptimizer/devirt_generic_witness_method_ownership.sil +++ b/test/SILOptimizer/devirt_generic_witness_method_ownership.sil @@ -29,7 +29,7 @@ bb0(%0 : $*Item, %1 : @owned $Dictionary, %2 : $@thick Item.Type): return %6 : $() } -// Check that it is possible to devirtualize a partial_appy of a generic witness_method. +// Check that it is possible to devirtualize a partial_apply of a generic witness_method. // Since it is a derived class that invokes an implementation from a base class, // make sure that the resulting closure is properly converted into a required type. diff --git a/test/SILOptimizer/dictionary_lookup_with_default.swift b/test/SILOptimizer/dictionary_lookup_with_default.swift index a2032682fe9d9..93d3e395ccd11 100644 --- a/test/SILOptimizer/dictionary_lookup_with_default.swift +++ b/test/SILOptimizer/dictionary_lookup_with_default.swift @@ -9,7 +9,7 @@ public struct S { mutating func doSomething() { } } -// Check that all partial_applys can be optimized away so that no closure context needs to be allocated. +// Check that all partial_applies can be optimized away so that no closure context needs to be allocated. // CHECK-LABEL: sil @$s4test6testit_1xySDySiAA1SVGz_SitF : // CHECK-NOT: partial_apply diff --git a/test/SILOptimizer/exclusivity_static_diagnostics.sil b/test/SILOptimizer/exclusivity_static_diagnostics.sil index c9be10afe1044..e8ab17d6bd382 100644 --- a/test/SILOptimizer/exclusivity_static_diagnostics.sil +++ b/test/SILOptimizer/exclusivity_static_diagnostics.sil @@ -1479,7 +1479,7 @@ bb0(%0 : $*TestDynamic): // This callee actually accesses different subpaths, but the caller's // diagnostic should not be able to see that. -sil private [dynamically_replacable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () { +sil private [dynamically_replaceable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () { bb0(%0 : $*Builtin.Int64, %1 : $*TestDynamic): %literal = integer_literal $Builtin.Int64, 1 %access1 = begin_access [modify] [unknown] %0 : $*Builtin.Int64 diff --git a/test/SILOptimizer/forwarding_utils.sil b/test/SILOptimizer/forwarding_utils.sil index aecb0a26f3587..47e96d5ef0310 100644 --- a/test/SILOptimizer/forwarding_utils.sil +++ b/test/SILOptimizer/forwarding_utils.sil @@ -51,7 +51,7 @@ entry(%0 : @owned $C, %1 : @owned $C): return %void : $() } -// In opaque SIL values mode, handle the tuple_pack_extract forwaded operand. +// In opaque SIL values mode, handle the tuple_pack_extract forwarded operand. // // CHECK-LABEL: begin running test 1 of 2 on tuplePackExtractTest: forwarding_def_use_test with: %tuple // CHECK: USE: operand #0 of end_borrow %1 : $(repeat each T) @@ -79,7 +79,7 @@ entry(%tuple_addr : $*(repeat each T)): return %retval : $() } -// Handle forwaded guaranteed values. +// Handle forwarded guaranteed values. // // CHECK-LABEL: begin running test 1 of 2 on forwardingGuaranteedTest: forwarding_def_use_test with: %0 // CHECK: USE: dead value: %5 = tuple (%3 : $C, %4 : $C) @@ -211,7 +211,7 @@ bbExit: return %void : $() } -// Chain of owned values. Needs to resolve in a resonable amount of time. +// Chain of owned values. Needs to resolve in a reasonable amount of time. // // CHECK-LABEL: begin running test 1 of 2 on forwardingTuplesTest: forwarding_def_use_test with: %0 // CHECK: USE: operand #0 of destroy_value %{{.*}} : $(C, C) diff --git a/test/SILOptimizer/function_uses.sil b/test/SILOptimizer/function_uses.sil index 2885e7855cde9..39ccae397cbfa 100644 --- a/test/SILOptimizer/function_uses.sil +++ b/test/SILOptimizer/function_uses.sil @@ -27,7 +27,7 @@ sil @public_func : $@convention(thin) () -> () // CHECK-NEXT: %1 = dynamic_function_ref @internal_func // CHECK-NEXT: ] // CHECK-NEXT: End function internal_func -sil hidden [dynamically_replacable] @internal_func : $@convention(thin) () -> () { +sil hidden [dynamically_replaceable] @internal_func : $@convention(thin) () -> () { bb0: %0 = function_ref @public_func : $@convention(thin) () -> () %1 = function_ref @public_func : $@convention(thin) () -> () diff --git a/test/SILOptimizer/hoist_destroy_addr.sil b/test/SILOptimizer/hoist_destroy_addr.sil index 340b9e824ea67..8dc95dfa0435d 100644 --- a/test/SILOptimizer/hoist_destroy_addr.sil +++ b/test/SILOptimizer/hoist_destroy_addr.sil @@ -590,7 +590,7 @@ entry(%in_addr : $*X): return %retval : $X } -// If a begin_apply uses the address, the end_appy and abort_apply should be +// If a begin_apply uses the address, the end_apply and abort_apply should be // regarded as uses too. Don't hoist over them. // // CHECK-LABEL: sil [ossa] @nohoist_over_end_apply_use : {{.*}} { diff --git a/test/SILOptimizer/init_accessors.swift b/test/SILOptimizer/init_accessors.swift index 43ddbff761410..708cb7ff08c3c 100644 --- a/test/SILOptimizer/init_accessors.swift +++ b/test/SILOptimizer/init_accessors.swift @@ -185,7 +185,7 @@ struct TestNoInitAndInit { var pointX: Int { @storageRestrictions(accesses: x) - init(initalValue) { + init(initialValue) { } get { x } diff --git a/test/SILOptimizer/let-property-lowering.swift b/test/SILOptimizer/let-property-lowering.swift index 5d1b8056d218c..57b5aabc79fac 100644 --- a/test/SILOptimizer/let-property-lowering.swift +++ b/test/SILOptimizer/let-property-lowering.swift @@ -68,7 +68,7 @@ class C { // CHECK: store {{.*}} to [[A]] : $*Int // CHECK: [[EI:%.*]] = end_init_let_ref %1 // CHECK: bb1: - // CHEKC: ref_element_addr [[EI]] : $C, #C.b + // CHECK: ref_element_addr [[EI]] : $C, #C.b // CHECK: return [[EI]] // CHECK: } // end sil function '$s4test1CC1cACSb_tcfc' init(c: Bool) { diff --git a/test/SILOptimizer/licm.sil b/test/SILOptimizer/licm.sil index a6911d5169180..83aacd7901a34 100644 --- a/test/SILOptimizer/licm.sil +++ b/test/SILOptimizer/licm.sil @@ -226,7 +226,7 @@ public protocol P : class { } // Check that LICM does not hoist a metatype instruction before -// the open_existential instruction which creates the archtype, +// the open_existential instruction which creates the archetype, // because this would break the dominance relation between them. // CHECK-LABEL: sil @dont_hoist_metatype // CHECK-NOT: metatype @@ -1096,7 +1096,7 @@ bb3: } // Test multiple stores to disjoint access paths with a single load -// that spans both of them. The load should be split and hosited and +// that spans both of them. The load should be split and hoisted and // and the stores be sunk. // testCommonSplitLoad // CHECK-LABEL: sil shared @testCommonSplitLoad : $@convention(method) (Int64, Builtin.RawPointer) -> (Int64, Int64, Int64) { diff --git a/test/SILOptimizer/moveonly_addresschecker.sil b/test/SILOptimizer/moveonly_addresschecker.sil index 1b969d62a9795..d7481d97bdff4 100644 --- a/test/SILOptimizer/moveonly_addresschecker.sil +++ b/test/SILOptimizer/moveonly_addresschecker.sil @@ -616,7 +616,7 @@ sil @end_addr_see_addr : $@convention(thin) (@in M, @in_guaranteed M) -> () /// A single instruction, apply @end_addr_see_addr, consumes one field and /// borrows another. -/// Varify that the consumed value isn't destroyed twice and that the borrowed +/// Verify that the consumed value isn't destroyed twice and that the borrowed /// value isn't destroyed before it's used. /// /// Note: This test case doesn't have valid SIL (#M2.s1 is consumed twice), but diff --git a/test/SILOptimizer/opaque_values_Onone.swift b/test/SILOptimizer/opaque_values_Onone.swift index dc13b6883a414..f79c20b7a4436 100644 --- a/test/SILOptimizer/opaque_values_Onone.swift +++ b/test/SILOptimizer/opaque_values_Onone.swift @@ -71,8 +71,8 @@ func doit(_ f: () -> T) -> T { // CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(Value, Value) // CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_ // CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]([[INSTANCE_ADDR_IN]]) -// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value -// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]] +// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (Value, Value) on [[INSTANCE_ADDR_IN]] : $*Value +// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]] // CHECK: apply {{%[^,]+}}<(Value, Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]]) // CHECK-LABEL: } // end sil function 'duplicate1' // CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate15valuex_xtx_tlFx_xtyXEfU_ : {{.*}} { @@ -93,8 +93,8 @@ func duplicate1(value: Value) -> (Value, Value) { // CHECK: [[OUTPUT_TUPLE_ADDR:%[^,]+]] = alloc_stack $(one: Value, two: Value) // CHECK: [[DUPLICATE_CLOSURE:%[^,]+]] = function_ref @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_ // CHECK: [[DUPLICATE_INSTANCE_CLOSURE:%[^,]+]] = partial_apply [callee_guaranteed] [on_stack] [[DUPLICATE_CLOSURE]]([[INSTANCE_ADDR_IN]]) -// CHECK: [[DEPENDENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value -// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENDENCY]] +// CHECK: [[DEPENDENCY:%[^,]+]] = mark_dependence [nonescaping] [[DUPLICATE_INSTANCE_CLOSURE]] : $@noescape @callee_guaranteed () -> @out (one: Value, two: Value) on [[INSTANCE_ADDR_IN]] : $*Value +// CHECK: [[CONVERTED:%[^,]+]] = convert_function [[DEPENDENCY]] // CHECK: apply {{%[^,]+}}<(one: Value, two: Value)>([[OUTPUT_TUPLE_ADDR]], [[CONVERTED]]) // CHECK-LABEL: } // end sil function 'duplicate2' // CHECK-LABEL: sil private @$s19opaque_values_Onone10duplicate25valuex3one_x3twotx_tlFxAD_xAEtyXEfU_ : {{.*}} { diff --git a/test/SILOptimizer/side_effects.sil b/test/SILOptimizer/side_effects.sil index 561e2d58ec677..6592c505878b4 100644 --- a/test/SILOptimizer/side_effects.sil +++ b/test/SILOptimizer/side_effects.sil @@ -447,12 +447,12 @@ bb0(%0 : @owned $SP): return %0 : $SP } -// CHECK-LABEL: sil [ossa] @store_destoys +// CHECK-LABEL: sil [ossa] @store_destroys // CHECK-NEXT: [%0: read v**, write v**, destroy v**] // CHECK-NEXT: [%1: write c*.v**, copy c*.v**] // CHECK-NEXT: [global: write,copy] // CHECK-NEXT: {{^[^[]}} -sil [ossa] @store_destoys : $@convention(thin) (@inout X, @owned X) -> () { +sil [ossa] @store_destroys : $@convention(thin) (@inout X, @owned X) -> () { bb0(%0 : $*X, %1 : @owned $X): store %1 to [assign] %0 : $*X %2 = tuple () @@ -482,24 +482,24 @@ bb0(%0 : $*X, %1 : @owned $X): return %2 : $() } -// CHECK-LABEL: sil [ossa] @copy_destoys +// CHECK-LABEL: sil [ossa] @copy_destroys // CHECK-NEXT: [%0: read v**, write v**, destroy v**] // CHECK-NEXT: [%1: read v**, copy v**] // CHECK-NEXT: [global: write,copy] // CHECK-NEXT: {{^[^[]}} -sil [ossa] @copy_destoys : $@convention(thin) (@inout X, @in_guaranteed X) -> () { +sil [ossa] @copy_destroys : $@convention(thin) (@inout X, @in_guaranteed X) -> () { bb0(%0 : $*X, %1 : $*X): copy_addr %1 to %0 : $*X %2 = tuple () return %2 : $() } -// CHECK-LABEL: sil [ossa] @copy_doesnt_destoy +// CHECK-LABEL: sil [ossa] @copy_doesnt_destroy // CHECK-NEXT: [%0: write v**] // CHECK-NEXT: [%1: read v**, copy v**] // CHECK-NEXT: [global: ] // CHECK-NEXT: {{^[^[]}} -sil [ossa] @copy_doesnt_destoy : $@convention(thin) (@in_guaranteed X) -> @out X { +sil [ossa] @copy_doesnt_destroy : $@convention(thin) (@in_guaranteed X) -> @out X { bb0(%0 : $*X, %1 : $*X): copy_addr %1 to [init] %0 : $*X %2 = tuple () diff --git a/test/SILOptimizer/sil_combine_concrete_existential.sil b/test/SILOptimizer/sil_combine_concrete_existential.sil index c9bcd18c8f024..dc306569c6278 100644 --- a/test/SILOptimizer/sil_combine_concrete_existential.sil +++ b/test/SILOptimizer/sil_combine_concrete_existential.sil @@ -660,7 +660,7 @@ extension MyObject : SubscriptionViewControllerDelegate { } sil @callee2 : $@convention(thin) <τ_0_0 where τ_0_0 : SubscriptionViewControllerDelegate> (@in τ_0_0, @thick SubscriptionViewControllerBuilder.Type) -> @owned SubscriptionViewControllerBuilder -// CHECK: sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () { +// CHECK: sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed any ResourceKitProtocol, @guaranteed ViewController) -> () { // CHECK: bb0([[ARG:%.*]] : $any ResourceKitProtocol, [[ARG2:%.*]] : $ViewController): // CHECK: [[T1:%.*]] = metatype $@thick SubscriptionViewControllerBuilder.Type // 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 // CHECK: (normal_conformance type="MyObject" protocol="SubscriptionViewControllerDelegate" // CHECK: apply [[T5]]<@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", any ResourceKitProtocol) Self>([[T6]], [[T1]]) -sil @test_opend_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () { +sil @test_opened_archetype_concrete_conformance_substitution : $@convention(method) (@guaranteed ResourceKitProtocol, @guaranteed ViewController) -> () { bb0(%0 : $ResourceKitProtocol, %1 : $ViewController): %4 = metatype $@thick SubscriptionViewControllerBuilder.Type %5 = open_existential_ref %0 : $ResourceKitProtocol to $@opened("E4D92D2A-8893-11EA-9C89-ACDE48001122", ResourceKitProtocol) Self diff --git a/test/SILOptimizer/simplify_begin_borrow.sil b/test/SILOptimizer/simplify_begin_borrow.sil index fd41fc0c393f6..a2ccb3b861030 100644 --- a/test/SILOptimizer/simplify_begin_borrow.sil +++ b/test/SILOptimizer/simplify_begin_borrow.sil @@ -341,10 +341,10 @@ bb0(%0 : @owned $C): return %0 : $C } -// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_differnt_bb : +// CHECK-LABEL: sil [ossa] @dont_replace_copy_in_different_bb : // CHECK: begin_borrow -// CHECK: } // end sil function 'dont_replace_copy_in_differnt_bb' -sil [ossa] @dont_replace_copy_in_differnt_bb : $@convention(thin) (@owned C) -> @owned C { +// CHECK: } // end sil function 'dont_replace_copy_in_different_bb' +sil [ossa] @dont_replace_copy_in_different_bb : $@convention(thin) (@owned C) -> @owned C { bb0(%0 : @owned $C): %1 = begin_borrow %0 : $C cond_br undef, bb1, bb2 diff --git a/test/SILOptimizer/simplify_cfg_checkcast.sil b/test/SILOptimizer/simplify_cfg_checkcast.sil index 9ed123989f104..35894aeb33931 100644 --- a/test/SILOptimizer/simplify_cfg_checkcast.sil +++ b/test/SILOptimizer/simplify_cfg_checkcast.sil @@ -538,7 +538,7 @@ bb7: // Introduce a copy for the new lifetime. // Simplify down to a single diamond. // -// TODO: Simplify some of the obvisouly dead copy/destroy/borrows +// TODO: Simplify some of the obviously dead copy/destroy/borrows // on-the-fly after each simplify-cfg. Possible using CanonicalizeOSSALifetime. // // TODO-CHECK-LABEL: sil [ossa] @redundant_checked_cast_br_rauw_guaranteed_to_owned_merge : $@convention(method) (@owned Base) -> () { diff --git a/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil b/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil index 658fb74890cf2..7a7d031914b1c 100644 --- a/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil +++ b/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil @@ -183,7 +183,7 @@ bb9: // not know how to allocate for multiple partial applies. // // rdar://119768691 (OwnershipModelEliminator triggers assertion when -// lowering certain [on_stack] partial_applys in certain +// lowering certain [on_stack] partial_applies in certain // circumstances) sil @test_simple_jump_thread_clone_partial_apply_closure : $@convention(thin) (@inout_aliasable Klass) -> () @@ -194,7 +194,7 @@ sil @test_simple_jump_thread_clone_partial_apply_take_closure : $@convention(thi // CHECK: partial_apply [callee_guaranteed] // CHECK-NEXT: mark_dependence // CHECK-NEXT: begin_borrow [lexical] -// CHECK-NOT: partial_apply [callee_guaranted] +// CHECK-NOT: partial_apply [callee_guaranteed] // CHECK-NOT: begin_borrow // CHECK-LABEL: } // end sil function 'test_simple_jump_thread_clone_partial_apply' sil [ossa] @test_simple_jump_thread_clone_partial_apply : $@convention(thin) (@owned Klass, @inout Klass) -> Builtin.Int1 { diff --git a/test/SILOptimizer/specialize_opaque_type_archetypes.swift b/test/SILOptimizer/specialize_opaque_type_archetypes.swift index 89b874a2ea723..7510b7174cea9 100644 --- a/test/SILOptimizer/specialize_opaque_type_archetypes.swift +++ b/test/SILOptimizer/specialize_opaque_type_archetypes.swift @@ -364,10 +364,10 @@ public func testResilientInlinableProperty2() { } // CHECK-LABEL: sil @$s1A035testResilientInlinablePropertyCallsbC0yyF : $@convention(thin) () -> () { -// CHECK: [[CONTAINTER:%.*]] = alloc_stack [var_decl] $ResilientContainer2 +// CHECK: [[CONTAINER:%.*]] = alloc_stack [var_decl] $ResilientContainer2 // CHECK: [[RES:%.*]] = alloc_stack $Int64 // CHECK: [[FUN:%.*]] = function_ref @$s9External319ResilientContainer2V023inlineablePropertyCallsB10InlineableQrvg -// CHECK: apply [[FUN]]([[RES]], [[CONTAINTER]]) +// CHECK: apply [[FUN]]([[RES]], [[CONTAINER]]) public func testResilientInlinablePropertyCallsResilientInlinable() { let r = ResilientContainer2() useP(r.inlineablePropertyCallsResilientInlineable.myValue3()) diff --git a/test/SILOptimizer/stack_protection.swift b/test/SILOptimizer/stack_protection.swift index 422496c6f67bd..4c5d08becc0ca 100644 --- a/test/SILOptimizer/stack_protection.swift +++ b/test/SILOptimizer/stack_protection.swift @@ -36,10 +36,10 @@ public func overflowWithUnsafeBytes() { } } -// CHECK-LABEL: sil [stack_protection] @$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF +// CHECK-LABEL: sil [stack_protection] @$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF // CHECK-NOT: copy_addr -// CHECK: } // end sil function '$s4test31owerflowWithUnsafeBorrowedBytes5valueySi_tF' -public func owerflowWithUnsafeBorrowedBytes(value: Int) { +// CHECK: } // end sil function '$s4test31overflowWithUnsafeBorrowedBytes5valueySi_tF' +public func overflowWithUnsafeBorrowedBytes(value: Int) { withUnsafeBytes(of: value) { potentiallyBadCFunction($0.bindMemory(to: Int.self).baseAddress!) } From de9e50fa1379b3b3e517b196582dbf674c0e7d87 Mon Sep 17 00:00:00 2001 From: Alexander Cyon Date: Mon, 8 Jul 2024 20:48:04 +0200 Subject: [PATCH 2/2] [test/SILOptimizer] Revert some typo changes. --- test/SILOptimizer/access_enforcement_selection.sil | 4 ++-- test/SILOptimizer/dictionary_lookup_with_default.swift | 2 +- test/SILOptimizer/exclusivity_static_diagnostics.sil | 2 +- test/SILOptimizer/function_uses.sil | 2 +- test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/SILOptimizer/access_enforcement_selection.sil b/test/SILOptimizer/access_enforcement_selection.sil index f0aa02766dde4..a9654b7c126af 100644 --- a/test/SILOptimizer/access_enforcement_selection.sil +++ b/test/SILOptimizer/access_enforcement_selection.sil @@ -67,7 +67,7 @@ sil [ossa] @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @gu sil [ossa] @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () // Test static enforcement of box addresses that escape via closure -// partial_applies. +// partial_applys. // application. // CHECK-LABEL: sil hidden [ossa] @escapeAsArgumentToPartialApply : $@convention(thin) () -> () { // CHECK: bb0: @@ -99,7 +99,7 @@ bb0: return %9 : $() } -sil [dynamically_replaceable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () +sil [dynamically_replacable] [ossa] @closureCapturingByStorageAddress2 : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () // Make sure that we handle dynamic_function_ref. sil hidden [ossa] @escapeAsArgumentToPartialApplyDynamic : $@convention(thin) () -> () { diff --git a/test/SILOptimizer/dictionary_lookup_with_default.swift b/test/SILOptimizer/dictionary_lookup_with_default.swift index 93d3e395ccd11..a2032682fe9d9 100644 --- a/test/SILOptimizer/dictionary_lookup_with_default.swift +++ b/test/SILOptimizer/dictionary_lookup_with_default.swift @@ -9,7 +9,7 @@ public struct S { mutating func doSomething() { } } -// Check that all partial_applies can be optimized away so that no closure context needs to be allocated. +// Check that all partial_applys can be optimized away so that no closure context needs to be allocated. // CHECK-LABEL: sil @$s4test6testit_1xySDySiAA1SVGz_SitF : // CHECK-NOT: partial_apply diff --git a/test/SILOptimizer/exclusivity_static_diagnostics.sil b/test/SILOptimizer/exclusivity_static_diagnostics.sil index e8ab17d6bd382..c9be10afe1044 100644 --- a/test/SILOptimizer/exclusivity_static_diagnostics.sil +++ b/test/SILOptimizer/exclusivity_static_diagnostics.sil @@ -1479,7 +1479,7 @@ bb0(%0 : $*TestDynamic): // This callee actually accesses different subpaths, but the caller's // diagnostic should not be able to see that. -sil private [dynamically_replaceable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () { +sil private [dynamically_replacable] [ossa] @testDynamicLocal : $@convention(thin) (@inout Builtin.Int64, @inout_aliasable TestDynamic) -> () { bb0(%0 : $*Builtin.Int64, %1 : $*TestDynamic): %literal = integer_literal $Builtin.Int64, 1 %access1 = begin_access [modify] [unknown] %0 : $*Builtin.Int64 diff --git a/test/SILOptimizer/function_uses.sil b/test/SILOptimizer/function_uses.sil index 39ccae397cbfa..2885e7855cde9 100644 --- a/test/SILOptimizer/function_uses.sil +++ b/test/SILOptimizer/function_uses.sil @@ -27,7 +27,7 @@ sil @public_func : $@convention(thin) () -> () // CHECK-NEXT: %1 = dynamic_function_ref @internal_func // CHECK-NEXT: ] // CHECK-NEXT: End function internal_func -sil hidden [dynamically_replaceable] @internal_func : $@convention(thin) () -> () { +sil hidden [dynamically_replacable] @internal_func : $@convention(thin) () -> () { bb0: %0 = function_ref @public_func : $@convention(thin) () -> () %1 = function_ref @public_func : $@convention(thin) () -> () diff --git a/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil b/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil index 7a7d031914b1c..0a74441575261 100644 --- a/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil +++ b/test/SILOptimizer/simplify_cfg_ossa_jump_threading.sil @@ -183,7 +183,7 @@ bb9: // not know how to allocate for multiple partial applies. // // rdar://119768691 (OwnershipModelEliminator triggers assertion when -// lowering certain [on_stack] partial_applies in certain +// lowering certain [on_stack] partial_applys in certain // circumstances) sil @test_simple_jump_thread_clone_partial_apply_closure : $@convention(thin) (@inout_aliasable Klass) -> ()