Remove redundant passes from legalization passes

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.
This commit is contained in:
Steven Perron 2018-01-12 15:15:57 -05:00 committed by David Neto
parent 6587d3f8a3
commit 8cb0aec724

View 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() {