Starting compiler work. Adding pass TODOs.

This commit is contained in:
Ben Vanik
2013-12-07 01:36:13 -08:00
parent fdb6a5cfa3
commit c2113c116d
16 changed files with 509 additions and 138 deletions

View File

@@ -32,8 +32,13 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) :
compiler_ = new Compiler();
// TODO(benvanik): passes in a sensible order/etc.
compiler_->AddPass(new passes::Mem2RegPass());
//compiler_->AddPass(new passes::ContextPromotionPass());
//compiler_->AddPass(new passes::ConstantPropagationPass());
//compiler_->AddPass(new passes::TypePropagationPass());
//compiler_->AddPass(new passes::ByteSwapEliminationPass());
compiler_->AddPass(new passes::SimplificationPass());
//compiler_->AddPass(new passes::DeadStoreEliminationPass());
//compiler_->AddPass(new passes::DeadCodeEliminationPass());
Backend* backend = frontend->runtime()->backend();
assembler_ = backend->CreateAssembler();