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

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

Issue 947963002: [turbofan] Initial version of branch cloning. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tests and documentation. Created 5 years, 9 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/control-flow-optimizer.cc ('k') | src/flag-definitions.h » ('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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 AddReducer(data, &graph_reducer, &common_reducer); 526 AddReducer(data, &graph_reducer, &common_reducer);
527 graph_reducer.ReduceGraph(); 527 graph_reducer.ReduceGraph();
528 } 528 }
529 }; 529 };
530 530
531 531
532 struct ControlFlowOptimizationPhase { 532 struct ControlFlowOptimizationPhase {
533 static const char* phase_name() { return "control flow optimization"; } 533 static const char* phase_name() { return "control flow optimization"; }
534 534
535 void Run(PipelineData* data, Zone* temp_zone) { 535 void Run(PipelineData* data, Zone* temp_zone) {
536 SourcePositionTable::Scope pos(data->source_positions(),
537 SourcePosition::Unknown());
536 ControlFlowOptimizer optimizer(data->jsgraph(), temp_zone); 538 ControlFlowOptimizer optimizer(data->jsgraph(), temp_zone);
537 optimizer.Optimize(); 539 optimizer.Optimize();
538 } 540 }
539 }; 541 };
540 542
541 543
542 struct ChangeLoweringPhase { 544 struct ChangeLoweringPhase {
543 static const char* phase_name() { return "change lowering"; } 545 static const char* phase_name() { return "change lowering"; }
544 546
545 void Run(PipelineData* data, Zone* temp_zone) { 547 void Run(PipelineData* data, Zone* temp_zone) {
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 Run<OsrDeconstructionPhase>(); 952 Run<OsrDeconstructionPhase>();
951 if (info()->bailout_reason() != kNoReason) return Handle<Code>::null(); 953 if (info()->bailout_reason() != kNoReason) return Handle<Code>::null();
952 RunPrintAndVerify("OSR deconstruction"); 954 RunPrintAndVerify("OSR deconstruction");
953 } 955 }
954 956
955 // Lower simplified operators and insert changes. 957 // Lower simplified operators and insert changes.
956 Run<SimplifiedLoweringPhase>(); 958 Run<SimplifiedLoweringPhase>();
957 RunPrintAndVerify("Lowered simplified"); 959 RunPrintAndVerify("Lowered simplified");
958 960
959 // Optimize control flow. 961 // Optimize control flow.
960 if (FLAG_turbo_switch) { 962 if (FLAG_turbo_cf_optimization) {
961 Run<ControlFlowOptimizationPhase>(); 963 Run<ControlFlowOptimizationPhase>();
962 RunPrintAndVerify("Control flow optimized"); 964 RunPrintAndVerify("Control flow optimized");
963 } 965 }
964 966
965 // Lower changes that have been inserted before. 967 // Lower changes that have been inserted before.
966 Run<ChangeLoweringPhase>(); 968 Run<ChangeLoweringPhase>();
967 // // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 969 // // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
968 RunPrintAndVerify("Lowered changes", true); 970 RunPrintAndVerify("Lowered changes", true);
969 971
970 Run<LateControlReductionPhase>(); 972 Run<LateControlReductionPhase>();
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 1197
1196 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { 1198 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {
1197 TurboCfgFile tcf(data->isolate()); 1199 TurboCfgFile tcf(data->isolate());
1198 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); 1200 tcf << AsC1VAllocator("CodeGen", data->register_allocator());
1199 } 1201 }
1200 } 1202 }
1201 1203
1202 } // namespace compiler 1204 } // namespace compiler
1203 } // namespace internal 1205 } // namespace internal
1204 } // namespace v8 1206 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/control-flow-optimizer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698