Remove redundant passes from legalization passes
authorSteven Perron <stevenperron@google.com>
Fri, 12 Jan 2018 20:15:57 +0000 (15:15 -0500)
committerDavid Neto <dneto@google.com>
Fri, 12 Jan 2018 22:47:50 +0000 (17:47 -0500)
With work that Alan has done, some passes have become redundant.  ADCE
now removed unused variables.  Dead branch elimination removes
unreachable blocks.  This means we can remove CFG Cleanup and dead
variable elimination.

source/opt/optimizer.cpp

index 1f60356..b85a8d8 100644 (file)
@@ -107,11 +107,8 @@ Optimizer& Optimizer::RegisterLegalizationPasses() {
           // May need loop unrolling here see
           // https://github.com/Microsoft/DirectXShaderCompiler/pull/930
           .RegisterPass(CreateDeadBranchElimPass())
-          .RegisterPass(CreateCFGCleanupPass())
           // Get rid of unused code that leave traces of the illegal code.
-          .RegisterPass(CreateAggressiveDCEPass())
-          // TODO: Remove this once ADCE can do it.
-          .RegisterPass(CreateDeadVariableEliminationPass());
+          .RegisterPass(CreateAggressiveDCEPass());
 }
 
 Optimizer& Optimizer::RegisterPerformancePasses() {