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

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

Issue 773443002: [turbofan] Add a PhaseScope for initialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 frame_(nullptr), 69 frame_(nullptr),
70 register_allocator_(nullptr) {} 70 register_allocator_(nullptr) {}
71 71
72 ~PipelineData() { 72 ~PipelineData() {
73 DeleteInstructionZone(); 73 DeleteInstructionZone();
74 DeleteGraphZone(); 74 DeleteGraphZone();
75 } 75 }
76 76
77 // For main entry point. 77 // For main entry point.
78 void Initialize(PipelineStatistics* pipeline_statistics) { 78 void Initialize(PipelineStatistics* pipeline_statistics) {
79 PhaseScope scope(pipeline_statistics, "init pipeline data");
79 outer_zone_ = info()->zone(); 80 outer_zone_ = info()->zone();
80 pipeline_statistics_ = pipeline_statistics; 81 pipeline_statistics_ = pipeline_statistics;
81 graph_zone_ = graph_zone_scope_.zone(); 82 graph_zone_ = graph_zone_scope_.zone();
82 graph_ = new (graph_zone()) Graph(graph_zone()); 83 graph_ = new (graph_zone()) Graph(graph_zone());
83 source_positions_.Reset(new SourcePositionTable(graph())); 84 source_positions_.Reset(new SourcePositionTable(graph()));
84 machine_ = new (graph_zone()) MachineOperatorBuilder( 85 machine_ = new (graph_zone()) MachineOperatorBuilder(
85 graph_zone(), kMachPtr, 86 graph_zone(), kMachPtr,
86 InstructionSelector::SupportedMachineOperatorFlags()); 87 InstructionSelector::SupportedMachineOperatorFlags());
87 common_ = new (graph_zone()) CommonOperatorBuilder(graph_zone()); 88 common_ = new (graph_zone()) CommonOperatorBuilder(graph_zone());
88 javascript_ = new (graph_zone()) JSOperatorBuilder(graph_zone()); 89 javascript_ = new (graph_zone()) JSOperatorBuilder(graph_zone());
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // TODO(turbofan): Make OSR work and remove this bailout. 709 // TODO(turbofan): Make OSR work and remove this bailout.
709 info()->is_osr()) { 710 info()->is_osr()) {
710 return Handle<Code>::null(); 711 return Handle<Code>::null();
711 } 712 }
712 713
713 ZonePool zone_pool(isolate()); 714 ZonePool zone_pool(isolate());
714 SmartPointer<PipelineStatistics> pipeline_statistics; 715 SmartPointer<PipelineStatistics> pipeline_statistics;
715 716
716 if (FLAG_turbo_stats) { 717 if (FLAG_turbo_stats) {
717 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool)); 718 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool));
719 pipeline_statistics->BeginPhaseKind("initializing");
718 } 720 }
719 721
720 PipelineData data(&zone_pool, info()); 722 PipelineData data(&zone_pool, info());
721 this->data_ = &data; 723 this->data_ = &data;
722 data.Initialize(pipeline_statistics.get()); 724 data.Initialize(pipeline_statistics.get());
723 725
724 BeginPhaseKind("graph creation"); 726 BeginPhaseKind("graph creation");
725 727
726 if (FLAG_trace_turbo) { 728 if (FLAG_trace_turbo) {
727 OFStream os(stdout); 729 OFStream os(stdout);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1026 }
1025 1027
1026 1028
1027 void Pipeline::TearDown() { 1029 void Pipeline::TearDown() {
1028 InstructionOperand::TearDownCaches(); 1030 InstructionOperand::TearDownCaches();
1029 } 1031 }
1030 1032
1031 } // namespace compiler 1033 } // namespace compiler
1032 } // namespace internal 1034 } // namespace internal
1033 } // namespace v8 1035 } // namespace v8
OLDNEW
« 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