Fixing CFG to remove unreachable blocks and properly maintain dominators.

This commit is contained in:
Ben Vanik
2015-06-07 15:14:14 -07:00
parent 10e8d0bd9b
commit 889f29c18a
4 changed files with 116 additions and 5 deletions

View File

@@ -50,7 +50,6 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) {
// The CFG is required for simplification and dirtied by it.
compiler_->AddPass(std::make_unique<passes::ControlFlowAnalysisPass>());
compiler_->AddPass(std::make_unique<passes::ControlFlowSimplificationPass>());
compiler_->AddPass(std::make_unique<passes::ControlFlowAnalysisPass>());
// Passes are executed in the order they are added. Multiple of the same
// pass type may be used.