File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -967,6 +967,13 @@ SILPassPipelinePlan::getPerformancePassPipeline(const SILOptions &Options) {
967967 // Perform optimizations that specialize.
968968 addClosureSpecializePassPipeline (P);
969969
970+ // For embedded Swift: We need to re-run VTableSpecializer in case the
971+ // performance inliner and specializer ended up discovering new generic
972+ // classes.
973+ if (Options.EmbeddedSwift ) {
974+ P.addVTableSpecializer ();
975+ }
976+
970977 // Run another iteration of the SSA optimizations to optimize the
971978 // devirtualized inline caches and constants propagated into closures
972979 // (CapturePropagation).
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-emit-ir -Osize %s -enable-experimental-feature Embedded | %FileCheck %s
2+
3+ public func foo< T> ( n: T ) {
4+ bar ( n: 42 )
5+ }
6+
7+ private func bar< T> ( n: T ) {
8+ baz ( n: 42 )
9+ }
10+
11+ public func baz< T> ( n: T ) {
12+ let x : ContiguousArray < Int > = . init( repeating: 0 , count: 1 )
13+ }
14+
15+ // CHECK: define {{.*}}@main(
You can’t perform that action at this time.
0 commit comments