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

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

Issue 2337123003: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: Address feedback. Created 4 years, 3 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/js-inlining.cc ('k') | src/full-codegen/arm/full-codegen-arm.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 <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 438
439 class AstGraphBuilderWithPositions final : public AstGraphBuilder { 439 class AstGraphBuilderWithPositions final : public AstGraphBuilder {
440 public: 440 public:
441 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info, 441 AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info,
442 JSGraph* jsgraph, 442 JSGraph* jsgraph,
443 LoopAssignmentAnalysis* loop_assignment, 443 LoopAssignmentAnalysis* loop_assignment,
444 TypeHintAnalysis* type_hint_analysis, 444 TypeHintAnalysis* type_hint_analysis,
445 SourcePositionTable* source_positions) 445 SourcePositionTable* source_positions)
446 : AstGraphBuilder(local_zone, info, jsgraph, loop_assignment, 446 : AstGraphBuilder(local_zone, info, jsgraph, 1.0f, loop_assignment,
447 type_hint_analysis), 447 type_hint_analysis),
448 source_positions_(source_positions), 448 source_positions_(source_positions),
449 start_position_(info->shared_info()->start_position()) {} 449 start_position_(info->shared_info()->start_position()) {}
450 450
451 bool CreateGraph(bool stack_check) { 451 bool CreateGraph(bool stack_check) {
452 SourcePositionTable::Scope pos_scope(source_positions_, start_position_); 452 SourcePositionTable::Scope pos_scope(source_positions_, start_position_);
453 return AstGraphBuilder::CreateGraph(stack_check); 453 return AstGraphBuilder::CreateGraph(stack_check);
454 } 454 }
455 455
456 #define DEF_VISIT(type) \ 456 #define DEF_VISIT(type) \
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 762
763 struct GraphBuilderPhase { 763 struct GraphBuilderPhase {
764 static const char* phase_name() { return "graph builder"; } 764 static const char* phase_name() { return "graph builder"; }
765 765
766 void Run(PipelineData* data, Zone* temp_zone) { 766 void Run(PipelineData* data, Zone* temp_zone) {
767 bool stack_check = !data->info()->IsStub(); 767 bool stack_check = !data->info()->IsStub();
768 bool succeeded = false; 768 bool succeeded = false;
769 769
770 if (data->info()->is_optimizing_from_bytecode()) { 770 if (data->info()->is_optimizing_from_bytecode()) {
771 BytecodeGraphBuilder graph_builder(temp_zone, data->info(), 771 BytecodeGraphBuilder graph_builder(temp_zone, data->info(),
772 data->jsgraph()); 772 data->jsgraph(), 1.0f);
773 succeeded = graph_builder.CreateGraph(); 773 succeeded = graph_builder.CreateGraph();
774 } else { 774 } else {
775 AstGraphBuilderWithPositions graph_builder( 775 AstGraphBuilderWithPositions graph_builder(
776 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(), 776 temp_zone, data->info(), data->jsgraph(), data->loop_assignment(),
777 data->type_hint_analysis(), data->source_positions()); 777 data->type_hint_analysis(), data->source_positions());
778 succeeded = graph_builder.CreateGraph(stack_check); 778 succeeded = graph_builder.CreateGraph(stack_check);
779 } 779 }
780 780
781 if (!succeeded) { 781 if (!succeeded) {
782 data->set_compilation_failed(); 782 data->set_compilation_failed();
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 data->DeleteRegisterAllocationZone(); 1949 data->DeleteRegisterAllocationZone();
1950 } 1950 }
1951 1951
1952 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1952 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1953 1953
1954 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1954 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1955 1955
1956 } // namespace compiler 1956 } // namespace compiler
1957 } // namespace internal 1957 } // namespace internal
1958 } // namespace v8 1958 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698