Adding fallback for pre-MOVBE-supporting processors.

This commit is contained in:
Ben Vanik
2015-06-16 20:05:55 -07:00
parent 75206149ab
commit c34db170f5
7 changed files with 62 additions and 14 deletions

View File

@@ -60,8 +60,12 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) : frontend_(frontend) {
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
compiler_->AddPass(std::make_unique<passes::ConstantPropagationPass>());
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
compiler_->AddPass(std::make_unique<passes::MemorySequenceCombinationPass>());
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
if (backend->machine_info()->supports_extended_load_store) {
// Backend supports the advanced LOAD/STORE instructions.
// These will save us a lot of HIR opcodes.
compiler_->AddPass(std::make_unique<passes::MemorySequenceCombinationPass>());
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
}
compiler_->AddPass(std::make_unique<passes::SimplificationPass>());
if (validate) compiler_->AddPass(std::make_unique<passes::ValidationPass>());
// compiler_->AddPass(std::make_unique<passes::DeadStoreEliminationPass>());