File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
libswift/Sources/Optimizer/PassManager Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ struct PassContext {
23
23
fileprivate let passContext : BridgedPassContext
24
24
25
25
var isSwift51RuntimeAvailable : Bool {
26
- PassContext_isSwift51RuntimeAvailable ( passContext) != 0
26
+ // Temporarily disable optimizations based on deployment target.
27
+ // rdar://87898692
28
+ return false
29
+ // PassContext_isSwift51RuntimeAvailable(passContext) != 0
27
30
}
28
31
29
32
var aliasAnalysis : AliasAnalysis {
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ import SwiftShims
12
12
13
13
sil_global public_external @_swiftEmptyArrayStorage : $_SwiftEmptyArrayStorage
14
14
15
+ // Check if the optimization is disbled.
16
+ // rdar://87898692
15
17
16
18
// CHECK-LABEL: sil @testEmptyArraySingleton
17
19
// CHECK: global_addr
18
- // CHECK-NOT: retain
20
+ // CHECK: retain
19
21
// CHECK: } // end sil function 'testEmptyArraySingleton'
20
22
sil @testEmptyArraySingleton : $@convention(thin) () -> @owned Builtin.BridgeObject {
21
23
bb0:
@@ -39,7 +41,7 @@ sil_global private @staticArray : $_ContiguousArrayStorage<Int> = {
39
41
40
42
// CHECK-LABEL: sil @testGlobalValue
41
43
// CHECK: global_value
42
- // CHECK-NOT: retain
44
+ // CHECK: retain
43
45
// CHECK: } // end sil function 'testGlobalValue'
44
46
sil @testGlobalValue : $@convention(thin) () -> @owned Builtin.BridgeObject {
45
47
bb0:
Original file line number Diff line number Diff line change 11
11
// Check that the optimizer can remove "unbalanced" retains for immortal objects.
12
12
// But only with a Swift 5.1 runtime (which supports immortal objects).
13
13
14
+ // Check if the optimization is disbled.
15
+ // rdar://87898692
16
+
14
17
// CHECK-LABEL: sil hidden [noinline] @$s4test10emptyArraySaySiGyF
15
18
// CHECK: global_addr
16
- // CHECK-NOT: retain
19
+ // CHECK: retain
17
20
// CHECK: } // end sil function '$s4test10emptyArraySaySiGyF'
18
21
@inline ( never)
19
22
func emptyArray( ) -> [ Int ] {
@@ -23,7 +26,7 @@ func emptyArray() -> [Int] {
23
26
24
27
// CHECK-LABEL: sil hidden [noinline] @$s4test13constantArraySaySiGyF
25
28
// CHECK: global_value
26
- // CHECK-NOT: retain
29
+ // CHECK: retain
27
30
// CHECK: } // end sil function '$s4test13constantArraySaySiGyF'
28
31
@inline ( never)
29
32
func constantArray( ) -> [ Int ] {
You can’t perform that action at this time.
0 commit comments