Skip to content

Commit 4c62204

Browse files
committed
Remove the stand-alone generic specialization pass.
We do generic specialization in the inliner now, so we no longer need the separate pass. The order the specializations are inserted into the module differs as a result of this, which means that one unfortunately huge test needed substantial changes. At some point this test needs to be converted to SIL and split up into smaller chunks. Swift SVN r31323
1 parent 53aa84a commit 4c62204

File tree

7 files changed

+162
-345
lines changed

7 files changed

+162
-345
lines changed

include/swift/SILPasses/Passes.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ PASS(EmitDFDiagnostics, "dataflow-diagnostics",
7474
"Emit SIL Diagnostics")
7575
PASS(FunctionSignatureOpts, "function-signature-opts",
7676
"Optimize Function Signatures")
77-
PASS(GenericSpecializer, "specialize",
78-
"Specialize generic functions")
7977
PASS(GlobalARCOpts, "global-arc-opts",
8078
"Perform multiple basic block arc optimizations")
8179
PASS(GlobalLoadStoreOpts, "global-load-store-opts",

lib/SILPasses/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ add_swift_library(swiftSILPasses
2020
SILCleanup.cpp
2121
SILCombine.cpp
2222
SILMem2Reg.cpp
23-
GenericSpecializer.cpp
2423
SpeculativeDevirtualizer.cpp
2524
SimplifyCFG.cpp
2625
PerformanceInliner.cpp

lib/SILPasses/GenericSpecializer.cpp

Lines changed: 0 additions & 191 deletions
This file was deleted.

lib/SILPasses/Passes.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ void AddSSAPasses(SILPassManager &PM, OptimizationLevelKind OpLevel) {
192192
PM.addEarlyCodeMotion();
193193
PM.addGlobalARCOpts();
194194

195-
PM.addGenericSpecializer();
196195
PM.addSILLinker();
197196

198197
switch (OpLevel) {
@@ -233,9 +232,8 @@ void swift::runSILOptimizationPasses(SILModule &Module) {
233232
SILPassManager PM(&Module, "PreSpecialize");
234233
registerAnalysisPasses(PM);
235234

236-
// Start by specializing generics and by cloning functions from stdlib.
235+
// Start by cloning functions from stdlib.
237236
PM.addSILLinker();
238-
PM.addGenericSpecializer();
239237
PM.run();
240238
PM.resetAndRemoveTransformations();
241239

0 commit comments

Comments
 (0)