Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(878)

Unified Diff: src/compiler/pipeline.cc

Issue 681263004: Run ControlReducer early after graph building, then again later. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix the glitch. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index a7d5ed14949f3c0c4863e20ca0c16760e88ac7ec..fc0a4326416e0470b9b63a33a4ff1bf6db72604d 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -22,7 +22,6 @@
#include "src/compiler/js-inlining.h"
#include "src/compiler/js-typed-lowering.h"
#include "src/compiler/machine-operator-reducer.h"
-#include "src/compiler/phi-reducer.h"
#include "src/compiler/pipeline-statistics.h"
#include "src/compiler/register-allocator.h"
#include "src/compiler/schedule.h"
@@ -323,19 +322,21 @@ Handle<Code> Pipeline::GenerateCode() {
graph_builder.CreateGraph();
context_node = graph_builder.GetFunctionContext();
}
- {
- PhaseScope phase_scope(pipeline_statistics.get(), "phi reduction");
- PhiReducer phi_reducer;
- GraphReducer graph_reducer(data.graph());
- graph_reducer.AddReducer(&phi_reducer);
- graph_reducer.ReduceGraph();
- // TODO(mstarzinger): Running reducer once ought to be enough for everyone.
- graph_reducer.ReduceGraph();
- graph_reducer.ReduceGraph();
- }
VerifyAndPrintGraph(data.graph(), "Initial untyped", true);
+ {
+ PhaseScope phase_scope(pipeline_statistics.get(),
+ "early control reduction");
+ SourcePositionTable::Scope pos(data.source_positions(),
+ SourcePosition::Unknown());
+ ZonePool::Scope zone_scope(data.zone_pool());
+ ControlReducer::ReduceGraph(zone_scope.zone(), data.jsgraph(),
+ data.common());
+
+ VerifyAndPrintGraph(data.graph(), "Early Control reduced", true);
+ }
+
if (info()->is_context_specializing()) {
SourcePositionTable::Scope pos(data.source_positions(),
SourcePosition::Unknown());
@@ -432,14 +433,15 @@ Handle<Code> Pipeline::GenerateCode() {
}
{
- PhaseScope phase_scope(pipeline_statistics.get(), "control reduction");
+ PhaseScope phase_scope(pipeline_statistics.get(),
+ "late control reduction");
SourcePositionTable::Scope pos(data.source_positions(),
SourcePosition::Unknown());
ZonePool::Scope zone_scope(data.zone_pool());
ControlReducer::ReduceGraph(zone_scope.zone(), data.jsgraph(),
data.common());
- VerifyAndPrintGraph(data.graph(), "Control reduced");
+ VerifyAndPrintGraph(data.graph(), "Late Control reduced");
}
}
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698