Adding control flow simplification pass to compensate for lack of phi.

This commit is contained in:
Ben Vanik
2014-08-06 14:19:42 -07:00
parent bba3315f58
commit b02ce5e95e
10 changed files with 187 additions and 8 deletions

View File

@@ -43,7 +43,10 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) {
bool validate = FLAGS_validate_hir;
// Build the CFG first.
// Merge blocks early. This will let us use more context in other passes.
// 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