Wire up simplified and change lowering in pipeline.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/511713003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2014-08-27 09:52:32 +00:00
parent 327d843d59
commit 5b253766f1

View File

@ -6,6 +6,7 @@
#include "src/base/platform/elapsed-timer.h"
#include "src/compiler/ast-graph-builder.h"
#include "src/compiler/change-lowering.h"
#include "src/compiler/code-generator.h"
#include "src/compiler/graph-replay.h"
#include "src/compiler/graph-visualizer.h"
@ -233,6 +234,32 @@ Handle<Code> Pipeline::GenerateCode() {
VerifyAndPrintGraph(&graph, "Lowered typed");
}
{
// Lower simplified operators and insert changes.
PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
"simplified lowering");
SourcePositionTable::Scope pos(&source_positions,
SourcePosition::Unknown());
SimplifiedLowering lowering(&jsgraph);
lowering.LowerAllNodes();
VerifyAndPrintGraph(&graph, "Lowered simplified");
}
{
// Lower changes that have been inserted before.
PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
"change lowering");
SourcePositionTable::Scope pos(&source_positions,
SourcePosition::Unknown());
Linkage linkage(info());
MachineOperatorBuilder machine(zone());
ChangeLowering lowering(&jsgraph, &linkage, &machine);
GraphReducer graph_reducer(&graph);
graph_reducer.AddReducer(&lowering);
graph_reducer.ReduceGraph();
VerifyAndPrintGraph(&graph, "Lowered changes");
}
}
Handle<Code> code = Handle<Code>::null();