Basic ContextPromotionPass and some opcode info rearranging.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <alloy/frontend/ppc/ppc_frontend.h>
|
||||
|
||||
#include <alloy/frontend/tracing.h>
|
||||
#include <alloy/frontend/ppc/ppc_context.h>
|
||||
#include <alloy/frontend/ppc/ppc_disasm.h>
|
||||
#include <alloy/frontend/ppc/ppc_emit.h>
|
||||
#include <alloy/frontend/ppc/ppc_translator.h>
|
||||
@@ -54,6 +55,10 @@ namespace {
|
||||
PPCFrontend::PPCFrontend(Runtime* runtime) :
|
||||
Frontend(runtime) {
|
||||
InitializeIfNeeded();
|
||||
|
||||
ContextInfo* info = new ContextInfo(sizeof(PPCContext));
|
||||
// Add fields/etc.
|
||||
context_info_ = info;
|
||||
}
|
||||
|
||||
PPCFrontend::~PPCFrontend() {
|
||||
|
||||
@@ -30,9 +30,9 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) :
|
||||
scanner_ = new PPCScanner(frontend);
|
||||
builder_ = new PPCFunctionBuilder(frontend);
|
||||
|
||||
compiler_ = new Compiler();
|
||||
compiler_ = new Compiler(frontend->runtime());
|
||||
|
||||
//compiler_->AddPass(new passes::ContextPromotionPass());
|
||||
compiler_->AddPass(new passes::ContextPromotionPass());
|
||||
//compiler_->AddPass(new passes::ConstantPropagationPass());
|
||||
//compiler_->AddPass(new passes::TypePropagationPass());
|
||||
//compiler_->AddPass(new passes::ByteSwapEliminationPass());
|
||||
|
||||
Reference in New Issue
Block a user