Skip to content

Commit 07fb290

Browse files
committed
Move DCE to later in the SSA passes.
Doing it later doesn't get in the way of other optimizations, and could result in removing more things that become dead in the meantime.
1 parent ff373e9 commit 07fb290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/PassManager/Passes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ void AddSSAPasses(SILPassManager &PM, OptimizationLevelKind OpLevel) {
225225
AddSimplifyCFGSILCombine(PM);
226226

227227
PM.addPerformanceConstantPropagation();
228-
PM.addDCE();
229228
PM.addCSE();
230229
PM.addSILCombine();
231230
PM.addJumpThreadSimplifyCFG();
@@ -237,6 +236,7 @@ void AddSSAPasses(SILPassManager &PM, OptimizationLevelKind OpLevel) {
237236

238237
// Perform retain/release code motion and run the first ARC optimizer.
239238
PM.addCSE();
239+
PM.addDCE();
240240
PM.addEarlyCodeMotion();
241241
PM.addARCSequenceOpts();
242242

0 commit comments

Comments
 (0)