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

Unified Diff: src/compiler/pipeline.cc

Issue 1198923002: [turbofan] Run DeadCodeElimination as part of the generic lowering phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | 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 3e46d6f5194bd6abc0356231c627d67d0d97691e..6f55e4c639541ab7aa3ceb3c385ec434e49e5a40 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -651,20 +651,6 @@ struct EarlyControlReductionPhase {
};
-struct LateControlReductionPhase {
- static const char* phase_name() { return "late control reduction"; }
- void Run(PipelineData* data, Zone* temp_zone) {
- GraphReducer graph_reducer(temp_zone, data->graph());
- DeadCodeElimination dce(&graph_reducer, data->graph(), data->common());
- CommonOperatorReducer common(&graph_reducer, data->graph(), data->common(),
- data->machine());
- graph_reducer.AddReducer(&dce);
- graph_reducer.AddReducer(&common);
- graph_reducer.ReduceGraph();
- }
-};
-
-
struct EarlyGraphTrimmingPhase {
static const char* phase_name() { return "early graph trimming"; }
void Run(PipelineData* data, Zone* temp_zone) {
@@ -706,13 +692,20 @@ struct GenericLoweringPhase {
static const char* phase_name() { return "generic lowering"; }
void Run(PipelineData* data, Zone* temp_zone) {
- JSGenericLowering generic(data->info()->is_typing_enabled(),
- data->jsgraph());
- SelectLowering select(data->jsgraph()->graph(), data->jsgraph()->common());
- TailCallOptimization tco(data->common(), data->graph());
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
- AddReducer(data, &graph_reducer, &generic);
- AddReducer(data, &graph_reducer, &select);
+ DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
+ data->common());
+ CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
+ data->common(), data->machine());
+ JSGenericLowering generic_lowering(data->info()->is_typing_enabled(),
+ data->jsgraph());
+ SelectLowering select_lowering(data->jsgraph()->graph(),
+ data->jsgraph()->common());
+ TailCallOptimization tco(data->common(), data->graph());
+ AddReducer(data, &graph_reducer, &dead_code_elimination);
+ AddReducer(data, &graph_reducer, &common_reducer);
+ AddReducer(data, &graph_reducer, &generic_lowering);
+ AddReducer(data, &graph_reducer, &select_lowering);
// TODO(turbofan): TCO is currently limited to stubs.
if (data->info()->IsStub()) AddReducer(data, &graph_reducer, &tco);
graph_reducer.ReduceGraph();
@@ -1113,9 +1106,6 @@ Handle<Code> Pipeline::GenerateCode() {
Run<ChangeLoweringPhase>();
// TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
RunPrintAndVerify("Lowered changes", true);
-
- Run<LateControlReductionPhase>();
- RunPrintAndVerify("Late Control reduced");
} else {
if (info()->is_osr()) {
Run<OsrDeconstructionPhase>();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698