mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
This commit is contained in:
@@ -16,12 +16,10 @@ public class M {
|
||||
// Verify that definite initialization doesn't create a bogus description of
|
||||
// self pointing to the liveness bitvector.
|
||||
|
||||
// CHECK: sil @$s4main1MC4fromAcA12WithDelegate_p_tKcfc
|
||||
// CHECK: bb0
|
||||
// CHECK-NEXT: %2 = alloc_stack $Builtin.Int2
|
||||
// CHECK-NOT: let
|
||||
// CHECK-NOT: name
|
||||
// CHECK: scope
|
||||
// CHECK-LABEL: sil @$s4main1MC4fromAcA12WithDelegate_p_tKcfc
|
||||
// CHECK: bb0
|
||||
// CHECK-NOT: alloc_stack $Builtin.Int2{{.*}}let
|
||||
// CHECK: } // end sil function '$s4main1MC4fromAcA12WithDelegate_p_tKcfc'
|
||||
public init(from d: WithDelegate) throws {
|
||||
guard let delegate = d.delegate as? DelegateB
|
||||
else { throw Err.s(0) }
|
||||
|
||||
Reference in New Issue
Block a user