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

Side by Side Diff: src/compiler/pipeline.cc

Issue 1061303002: [turbofan] Match selects in control reducer (configurable). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/compiler/node-matchers.h ('k') | test/unittests/compiler/control-reducer-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 AddReducer(data, &graph_reducer, &vn_reducer); 586 AddReducer(data, &graph_reducer, &vn_reducer);
587 AddReducer(data, &graph_reducer, &simple_reducer); 587 AddReducer(data, &graph_reducer, &simple_reducer);
588 AddReducer(data, &graph_reducer, &lowering); 588 AddReducer(data, &graph_reducer, &lowering);
589 AddReducer(data, &graph_reducer, &machine_reducer); 589 AddReducer(data, &graph_reducer, &machine_reducer);
590 AddReducer(data, &graph_reducer, &common_reducer); 590 AddReducer(data, &graph_reducer, &common_reducer);
591 graph_reducer.ReduceGraph(); 591 graph_reducer.ReduceGraph();
592 } 592 }
593 }; 593 };
594 594
595 595
596 struct ControlReductionPhase { 596 struct EarlyControlReductionPhase {
597 static const char* phase_name() { return "early control reduction"; }
597 void Run(PipelineData* data, Zone* temp_zone) { 598 void Run(PipelineData* data, Zone* temp_zone) {
598 SourcePositionTable::Scope pos(data->source_positions(), 599 SourcePositionTable::Scope pos(data->source_positions(),
599 SourcePosition::Unknown()); 600 SourcePosition::Unknown());
600 ControlReducer::ReduceGraph(temp_zone, data->jsgraph(), data->common()); 601 ControlReducer::ReduceGraph(temp_zone, data->jsgraph(), data->common(), 1);
601 } 602 }
602 }; 603 };
603 604
604 605
605 struct EarlyControlReductionPhase : ControlReductionPhase { 606 struct LateControlReductionPhase {
606 static const char* phase_name() { return "early control reduction"; } 607 static const char* phase_name() { return "late control reduction"; }
608 void Run(PipelineData* data, Zone* temp_zone) {
609 SourcePositionTable::Scope pos(data->source_positions(),
610 SourcePosition::Unknown());
611 ControlReducer::ReduceGraph(temp_zone, data->jsgraph(), data->common(), 0);
612 }
607 }; 613 };
608 614
609 615
610 struct LateControlReductionPhase : ControlReductionPhase {
611 static const char* phase_name() { return "late control reduction"; }
612 };
613
614
615 struct StressLoopPeelingPhase { 616 struct StressLoopPeelingPhase {
616 static const char* phase_name() { return "stress loop peeling"; } 617 static const char* phase_name() { return "stress loop peeling"; }
617 618
618 void Run(PipelineData* data, Zone* temp_zone) { 619 void Run(PipelineData* data, Zone* temp_zone) {
619 SourcePositionTable::Scope pos(data->source_positions(), 620 SourcePositionTable::Scope pos(data->source_positions(),
620 SourcePosition::Unknown()); 621 SourcePosition::Unknown());
621 // Peel the first outer loop for testing. 622 // Peel the first outer loop for testing.
622 // TODO(titzer): peel all loops? the N'th loop? Innermost loops? 623 // TODO(titzer): peel all loops? the N'th loop? Innermost loops?
623 LoopTree* loop_tree = LoopFinder::BuildLoopTree(data->graph(), temp_zone); 624 LoopTree* loop_tree = LoopFinder::BuildLoopTree(data->graph(), temp_zone);
624 if (loop_tree != NULL && loop_tree->outer_loops().size() > 0) { 625 if (loop_tree != NULL && loop_tree->outer_loops().size() > 0) {
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 1237
1237 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { 1238 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {
1238 TurboCfgFile tcf(data->isolate()); 1239 TurboCfgFile tcf(data->isolate());
1239 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); 1240 tcf << AsC1VAllocator("CodeGen", data->register_allocator());
1240 } 1241 }
1241 } 1242 }
1242 1243
1243 } // namespace compiler 1244 } // namespace compiler
1244 } // namespace internal 1245 } // namespace internal
1245 } // namespace v8 1246 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-matchers.h ('k') | test/unittests/compiler/control-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698