Skip to content

Commit 285ad7f

Browse files
committed
Optimizer: replace PredictableMemoryAccessOptimizations with MandatoryRedundantLoadElimination in the pass pipeline
PredictableMemoryAccessOptimizations has become unmaintainable as-is. RedundantLoadElimination does (almost) the same thing as PredictableMemoryAccessOptimizations. It's not as powerful but good enough because PredictableMemoryAccessOptimizations is actually only needed for promoting integer values for mandatory constant propagation. And most importantly: RedundantLoadElimination does not insert additional copies which was a big problem in PredictableMemoryAccessOptimizations. Fixes rdar://142814676
1 parent 36b9f4e commit 285ad7f

29 files changed

+190
-398
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
213213

214214
// Promote loads as necessary to ensure we have enough SSA formation to emit
215215
// SSA based diagnostics.
216-
P.addPredictableMemoryAccessOptimizations();
216+
P.addMandatoryRedundantLoadElimination();
217217

218218
// This phase performs optimizations necessary for correct interoperation of
219219
// Swift os log APIs with C os_log ABIs.

test/DebugInfo/conditional-assign.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ public class M {
1616
// Verify that definite initialization doesn't create a bogus description of
1717
// self pointing to the liveness bitvector.
1818

19-
// CHECK: sil @$s4main1MC4fromAcA12WithDelegate_p_tKcfc
20-
// CHECK: bb0
21-
// CHECK-NEXT: %2 = alloc_stack $Builtin.Int2
22-
// CHECK-NOT: let
23-
// CHECK-NOT: name
24-
// CHECK: scope
19+
// CHECK-LABEL: sil @$s4main1MC4fromAcA12WithDelegate_p_tKcfc
20+
// CHECK: bb0
21+
// CHECK-NOT: alloc_stack $Builtin.Int2{{.*}}let
22+
// CHECK: } // end sil function '$s4main1MC4fromAcA12WithDelegate_p_tKcfc'
2523
public init(from d: WithDelegate) throws {
2624
guard let delegate = d.delegate as? DelegateB
2725
else { throw Err.s(0) }

test/Distributed/SIL/distributed_actor_default_init_sil_1.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ distributed actor MyDistActor {
4444
// CHECK: [[RELOADED_SYS1:%[0-9]+]] = load [[TP_FIELD2]] : $*FakeActorSystem
4545
// CHECK: [[SELF_METATYPE:%[0-9]+]] = metatype $@thick MyDistActor.Type
4646
// CHECK: [[ASSIGN_ID_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV8assignIDyAA0C7AddressVxm0B00bC0RzAF0G0RtzlF
47-
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], [[RELOADED_SYS1]])
47+
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]],
4848

4949
// *** save identity ***
5050
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
51-
// CHECK: store [[ID]] to [[ID_FIELD]] : $*ActorAddress
51+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
5252

5353
// *** invoke actorReady ***
5454
// CHECK: [[TP_FIELD3:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem
5555
// CHECK: [[RELOADED_SYS2:%[0-9]+]] = load [[TP_FIELD3]] : $*FakeActorSystem
5656
// CHECK: [[READY_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV10actorReadyyyx0B00bC0RzAA0C7AddressV2IDRtzlF
57-
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], [[RELOADED_SYS2]])
57+
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]],
5858

5959
// CHECK: } // end sil function '$s14default_deinit11MyDistActorC11system_syncAC015FakeDistributedE7Systems0hE6SystemV_tcfc'
6060

test/Distributed/SIL/distributed_actor_default_init_sil_2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ distributed actor MyDistActor {
3737
// CHECK: store [[SYS_PARAM]] to [[SYS_FIELD]] : $*FakeActorSystem
3838

3939
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
40-
// CHECK: store {{%[0-9]+}} to [[ID_FIELD]] : $*ActorAddress
40+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
4141

4242
// CHECK: [[RAW_BOOL:%[0-9]+]] = struct_extract [[COND]] : $Bool, #Bool._value
4343
// CHECK: cond_br [[RAW_BOOL]], [[SUCCESS_BB:bb[0-9]+]], [[FAIL_BB:bb[0-9]+]]

test/Distributed/SIL/distributed_actor_default_init_sil_5.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ distributed actor MyDistActor {
3737
// CHECK: [[SYS_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem
3838
// CHECK: store [[SYSTEM]] to [[SYS_FIELD]] : $*FakeActorSystem
3939
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
40-
// CHECK: store {{.*}} to [[ID_FIELD]] : $*ActorAddress
40+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
4141
// CHECK: [[RAW_BOOL:%[0-9]+]] = struct_extract [[COND]] : $Bool, #Bool._value
4242
// CHECK: cond_br [[RAW_BOOL]], [[TRUE_BB:bb[0-9]+]], [[FALSE_BB:bb[0-9]+]]
4343

@@ -51,7 +51,7 @@ distributed actor MyDistActor {
5151
// CHECK: [[FALSE_BB]]:
5252
// CHECK: br [[JOIN]]
5353

54-
// CHECK: [[JOIN]]:
54+
// CHECK: [[JOIN]]({{.*}} : $Builtin.Int3):
5555
// CHECK: cond_br {{%[0-9]+}}, [[PARTIAL_DEINIT:bb[0-9]+]], [[NO_DEINIT:bb[0-9]+]]
5656

5757
// CHECK: [[PARTIAL_DEINIT]]:

test/Distributed/SIL/distributed_actor_default_init_sil_6.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ distributed actor MyDistActor {
4242
// CHECK: [[RELOADED_SYS1:%[0-9]+]] = load [[TP_FIELD2]] : $*FakeActorSystem
4343
// CHECK: [[SELF_METATYPE:%[0-9]+]] = metatype $@thick MyDistActor.Type
4444
// CHECK: [[ASSIGN_ID_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV8assignIDyAA0C7AddressVxm0B00bC0RzAF0G0RtzlF
45-
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], [[RELOADED_SYS1]])
45+
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]],
4646

4747
// *** save identity ***
4848
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
49-
// CHECK: store [[ID]] to [[ID_FIELD]] : $*ActorAddress
49+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
5050

5151
// *** invoke actorReady ***
5252
// CHECK: [[TP_FIELD3:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem
5353
// CHECK: [[RELOADED_SYS2:%[0-9]+]] = load [[TP_FIELD3]] : $*FakeActorSystem
5454
// CHECK: [[READY_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV10actorReadyyyx0B00bC0RzAA0C7AddressV2IDRtzlF
55-
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], [[RELOADED_SYS2]])
55+
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]],
5656
// CHECK: return [[SELF]]
5757

5858
// CHECK: [[ERROR_BB]]([[ERRVAL:%[0-9]+]] : $any Error):

test/Distributed/SIL/distributed_actor_default_init_sil_7.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ distributed actor MyDistActor {
4949
// CHECK: [[RELOADED_SYS1:%[0-9]+]] = load [[TP_FIELD2]] : $*FakeActorSystem
5050
// CHECK: [[SELF_METATYPE:%[0-9]+]] = metatype $@thick MyDistActor.Type
5151
// CHECK: [[ASSIGN_ID_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV8assignIDyAA0C7AddressVxm0B00bC0RzAF0G0RtzlF
52-
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], [[RELOADED_SYS1]])
52+
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], {{.*}}
5353
// *** save identity ***
5454
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
55-
// CHECK: store [[ID]] to [[ID_FIELD]] : $*ActorAddress
55+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
5656
// CHECK-NOT: apply
5757
// CHECK: br [[JOIN_PT:bb[0-9]+]]
5858

@@ -65,7 +65,7 @@ distributed actor MyDistActor {
6565
// CHECK: [[TP_FIELD3:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem
6666
// CHECK: [[RELOADED_SYS2:%[0-9]+]] = load [[TP_FIELD3]] : $*FakeActorSystem
6767
// CHECK: [[READY_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0aC6SystemV10actorReadyyyx0B00bC0RzAA0C7AddressV2IDRtzlF
68-
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], [[RELOADED_SYS2]])
68+
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], {{.*}}
6969
// CHECK: return [[SELF]] : $MyDistActor
7070

7171
// CHECK: [[SYSTEM_ERROR_BB]]{{.*}}:

test/Distributed/SIL/distributed_actor_default_init_sil_8.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ distributed actor MyDistActor {
5151
// CHECK: [[SELF_METATYPE:%[0-9]+]] = metatype $@thick MyDistActor.Type
5252
// CHECK: strong_retain [[RELOADED_SYS1]] : $FakeRoundtripActorSystem
5353
// CHECK: [[ASSIGN_ID_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0a9RoundtripC6SystemC8assignIDyAA0C7AddressVxm0B00bC0RzlF
54-
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], [[RELOADED_SYS1]])
55-
// CHECK: strong_release [[RELOADED_SYS1]] : $FakeRoundtripActorSystem
54+
// CHECK: [[ID:%[0-9]+]] = apply [[ASSIGN_ID_FN]]<MyDistActor>([[SELF_METATYPE]], {{.*}})
55+
// CHECK: strong_release {{.*}} : $FakeRoundtripActorSystem
5656
// *** save identity ***
5757
// CHECK: [[ID_FIELD:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.id
58-
// CHECK: store [[ID]] to [[ID_FIELD]] : $*ActorAddress
58+
// CHECK: copy_addr {{.*}} to [init] [[ID_FIELD]] : $*ActorAddress
5959
// CHECK-NOT: apply
6060
// CHECK: br [[JOIN_PT:bb[0-9]+]]
6161

@@ -68,7 +68,7 @@ distributed actor MyDistActor {
6868
// CHECK: [[TP_FIELD3:%[0-9]+]] = ref_element_addr [[SELF]] : $MyDistActor, #MyDistActor.actorSystem
6969
// CHECK: [[RELOADED_SYS2:%[0-9]+]] = load [[TP_FIELD3]] : $*FakeRoundtripActorSystem
7070
// CHECK: [[READY_FN:%[0-9]+]] = function_ref @$s27FakeDistributedActorSystems0a9RoundtripC6SystemC10actorReadyyyx0B00bC0RzAA0C7AddressV2IDRtzlF
71-
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], [[RELOADED_SYS2]])
71+
// CHECK: = apply [[READY_FN]]<MyDistActor>([[SELF]], {{.*}})
7272
// CHECK: return [[SELF]] : $MyDistActor
7373

7474
// CHECK: [[SYSTEM_ERROR_BB]]([[ERROR_ARG:%[0-9]+]] : $any Error):

test/IRGen/typed_throws_abi.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,7 @@ func callImplAsync_i5(_ impl: ImplAsync, _ b: Bool) async -> (Int, Int, Int, Int
29942994
// CHECK: [[SUCCESS]]:
29952995
// CHECK: ret { float, float, i64 } { float 1.000000e+00, float 2.000000e+00, i64 undef }
29962996
// CHECK: [[FAIL]]:
2997-
// CHECK: [[ERROR_RES0:%.*]] = load i64, ptr %.x1._value, align 8
2997+
// CHECK: [[ERROR_RES0:%.*]] = call swiftcc i64 @"$s16typed_throws_abi7OneWordVACycfC"()
29982998
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
29992999
// CHECK: [[ERROR_RES:%.*]] = insertvalue { float, float, i64 } undef, i64 [[ERROR_RES0]], 2
30003000
// CHECK: ret { float, float, i64 } [[ERROR_RES]]
@@ -3049,7 +3049,7 @@ func callNonMatching_f0(_ b: Bool) -> (Int, Float, Float) {
30493049
// CHECK: [[SUCCESS]]:
30503050
// CHECK: ret { float, i64, float } { float 1.000000e+00, i64 1, float 2.000000e+00 }
30513051
// CHECK: [[FAIL]]:
3052-
// CHECK: [[ERROR_RES0:%.*]] = load i64, ptr %.x1._value, align 8
3052+
// CHECK: [[ERROR_RES0:%.*]] = call swiftcc i64 @"$s16typed_throws_abi7OneWordVACycfC"()
30533053
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
30543054
// CHECK: [[ERROR_RES:%.*]] = insertvalue { float, i64, float } undef, i64 [[ERROR_RES0]], 1
30553055
// CHECK: ret { float, i64, float } [[ERROR_RES]]
@@ -3108,7 +3108,7 @@ func callNonMatching_f1(_ b: Bool) -> (Int, Float, Bool, Float) {
31083108
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi20nonMatching_f0_asyncySf_SftSbYaAA7OneWordVYKF{{.*}}", ptr {{%.*}}, ptr {{%.*}}, float 1.000000e+00, float 2.000000e+00, i64 undef, ptr null)
31093109
// CHECK: unreachable
31103110
// CHECK: 18:
3111-
// CHECK: [[ERROR_X:%.*]] = load i64, ptr %.x1._value, align 8
3111+
// CHECK: [[ERROR_X:%.*]] = call swiftcc i64 @"$s16typed_throws_abi7OneWordVACycfC"()
31123112
// CHECK: [[ERROR_RET:%.*]] = insertvalue { float, float, i64 } undef, i64 [[ERROR_X]], 2
31133113
// CHECK: [[ERROR_RET0:%.*]] = extractvalue { float, float, i64 } [[ERROR_RET]], 0
31143114
// CHECK: [[ERROR_RET1:%.*]] = extractvalue { float, float, i64 } [[ERROR_RET]], 1
@@ -3168,7 +3168,7 @@ func callNonMatching_f0_async(_ b: Bool) async -> (Int, Float, Float) {
31683168
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi20nonMatching_f1_asyncySf_SbSftSbYaAA7OneWordVYKF{{.*}}", ptr {{%.*}}, ptr {{%.*}}, float 1.000000e+00, i64 1, float 2.000000e+00, ptr null)
31693169
// CHECK: unreachable
31703170
// CHECK: [[ERROR]]:
3171-
// CHECK: [[ERROR_X:%.*]] = load i64, ptr %.x1._value, align 8
3171+
// CHECK: [[ERROR_X:%.*]] = call swiftcc i64 @"$s16typed_throws_abi7OneWordVACycfC"()
31723172
// CHECK: [[ERROR_RET:%.*]] = insertvalue { float, i64, float } undef, i64 [[ERROR_X]], 1
31733173
// CHECK: [[ERROR_RET0:%.*]] = extractvalue { float, i64, float } [[ERROR_RET]], 0
31743174
// CHECK: [[ERROR_RET1:%.*]] = extractvalue { float, i64, float } [[ERROR_RET]], 1

test/Interop/C/struct/foreign-reference.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public func blackHole<T>(_ _: T) { }
1616
ReferenceCountedTestSuite.test("Local") {
1717
var x = createLocalCount()
1818
#if NO_OPTIMIZATIONS
19-
expectEqual(x.value, 6) // This is 6 because of "var x" "x.value" * 2 and "(x, x, x)".
19+
expectEqual(x.value, 2)
2020
#endif
2121

2222
let t = (x, x, x)

test/Interop/Cxx/foreign-reference/reference-counted.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public func blackHole<T>(_ _: T) { }
2020
func localTest() {
2121
var x = NS.LocalCount.create()
2222
#if NO_OPTIMIZATIONS
23-
expectEqual(x.value, 8) // This is 8 because of "var x" "x.value" * 2, two method calls on x, and "(x, x, x)".
23+
expectEqual(x.value, 2)
2424
#endif
2525

2626
expectEqual(x.returns42(), 42)

test/Interop/CxxToSwiftToCxx/consuming-cxx-struct-parameter-back-to-cxx-execution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ int main() {
137137
}
138138
// CHECK: create NonTrivialTemplate
139139
// CHECK-NEXT: copy NonTrivialTemplate
140-
// CHECK-NEXT: x and y: 1, 2
141140
// CHECK-NEXT: ~NonTrivialTemplate
141+
// CHECK-NEXT: x and y: 1, 2
142142
// CHECK-NEXT: DoneCall
143143
// CHECK-NEXT: ~NonTrivialTemplate
144144
{

test/SILGen/reference_bindings.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ func doSomething() {}
3535
// SIL: [[BOX:%.*]] = alloc_stack [var_decl] $Int, var, name "x"
3636
// SIL: [[INOUT_BOX:%.*]] = alloc_stack [var_decl] $Int, var, name "x2"
3737
// SIL: [[ACCESS:%.*]] = begin_access [modify] [static] [[BOX]]
38-
// SIL: store {{%.*}} to [[INOUT_BOX]]
38+
// SIL: copy_addr [take] [[ACCESS]] to [init] [[INOUT_BOX]]
3939
// SIL: [[FUNC:%.*]] = function_ref @$s18reference_bindings11doSomethingyyF : $@convention(thin) () -> ()
4040
// SIL: apply [[FUNC]]()
41-
// SIL: store {{%.*}} to [[ACCESS]]
41+
// SIL: copy_addr [take] [[INOUT_BOX]] to [init] [[ACCESS]]
4242
// SIL: end_access [[ACCESS]]
4343
// SIL: } // end sil function '$s18reference_bindings13testBindToVaryyF'
4444
func testBindToVar() {
@@ -64,11 +64,9 @@ func testBindToVar() {
6464
// SIL: bb0([[ARG:%.*]] : $*String):
6565
// SIL: [[STACK:%.*]] = alloc_stack [var_decl] $String
6666
// SIL: [[ACCESS:%.*]] = begin_access [modify] [static] [[ARG]]
67-
// SIL: [[VAL:%.*]] = load [[ACCESS]]
68-
// SIL: store [[VAL]] to [[STACK]]
67+
// SIL: copy_addr [take] [[ACCESS]] to [init] [[STACK]]
6968
// SIL: apply {{%.*}}
70-
// SIL: [[VAL:%.*]] = load [[STACK]]
71-
// SIL: store [[VAL]] to [[ACCESS]]
69+
// SIL: copy_addr [take] [[STACK]] to [init] [[ACCESS]]
7270
// SIL: end_access [[ACCESS]]
7371
// SIL: dealloc_stack [[STACK]]
7472
// SIL: } // end sil function '$s18reference_bindings15testBindToInOutyySSzF'

test/SILOptimizer/access_marker_mandatory.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ public struct S {
1717
// CHECK: [[WRITE:%.*]] = begin_access [modify] [static] [[STK]] : $*S
1818
// CHECK: store %{{.*}} to [[WRITE]] : $*S
1919
// CHECK: end_access [[WRITE]]
20-
// CHECK: bb3:
20+
// CHECK: bb3([[RET:%.*]] : $S):
2121
// CHECK: [[READ:%.*]] = begin_access [read] [static] [[STK]] : $*S
22-
// CHECK: [[RET:%.*]] = load [[READ]] : $*S
2322
// CHECK: end_access [[READ]]
2423
// CHECK: destroy_addr [[STK]]
2524
// CHECK: dealloc_stack [[STK]]

test/SILOptimizer/constant_evaluable_subset_test.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// especially performance inlining as it inlines functions such as String.+=
1515
// that the evaluator has special knowledge about.
1616
//
17-
// RUN: not %target-sil-opt -sil-print-types -opt-mode=speed -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -mandatory-inlining -predictable-memaccess-opts -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > /dev/null 2> %t/error-output-mandatory
17+
// RUN: not %target-sil-opt -sil-print-types -opt-mode=speed -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -mandatory-inlining -mandatory-redundant-load-elimination -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > /dev/null 2> %t/error-output-mandatory
1818
//
1919
// RUN: %FileCheck %S/Inputs/constant_evaluable.swift < %t/error-output-mandatory
2020

test/SILOptimizer/constant_evaluable_subset_test_arch64.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// especially performance inlining as it inlines functions such as String.+=
1717
// that the evaluator has special knowledge about.
1818
//
19-
// RUN: not %target-sil-opt -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -ownership-model-eliminator -mandatory-inlining -predictable-memaccess-opts -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_arch64_silgen.sil > /dev/null 2> %t/error-output-mandatory
19+
// RUN: not %target-sil-opt -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -ownership-model-eliminator -mandatory-inlining -mandatory-redundant-load-elimination -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_arch64_silgen.sil > /dev/null 2> %t/error-output-mandatory
2020
//
2121
// RUN: %FileCheck %s < %t/error-output-mandatory
2222

test/SILOptimizer/definite_init_actor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ actor BoringActor {
188188
// CHECK: store [[INIT2]] to [[SELF_ALLOC]] : $*SingleVarActor
189189
// CHECK-NEXT: hop_to_executor [[INIT2]] : $SingleVarActor
190190

191+
// CHECK: bb3([[T0:%.*]] : $SingleVarActor):
191192
// CHECK: [[ARBITRARY_FN:%.*]] = function_ref @$s4test14arbitraryAsyncyyYaF
192193
// CHECK-NEXT: apply [[ARBITRARY_FN]]()
193-
// CHECK-NEXT: [[T0:%.*]] = load [[SELF_ALLOC]] :
194194
// CHECK-NEXT: strong_retain [[T0]]
195195
// CHECK-NEXT: [[T1:%.*]] = init_existential_ref [[T0]] :
196196
// CHECK-NEXT: [[T2:%.*]] = enum $Optional<any Actor>, #Optional.some!enumelt, [[T1]] :

0 commit comments

Comments
 (0)