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

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

Issue 1391903002: [turbofan] Separate JSInliningHeuristic into own class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 2 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-heuristic.cc ('k') | tools/gyp/v8.gyp » ('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/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 13 matching lines...) Expand all
24 #include "src/compiler/graph-visualizer.h" 24 #include "src/compiler/graph-visualizer.h"
25 #include "src/compiler/greedy-allocator.h" 25 #include "src/compiler/greedy-allocator.h"
26 #include "src/compiler/instruction.h" 26 #include "src/compiler/instruction.h"
27 #include "src/compiler/instruction-selector.h" 27 #include "src/compiler/instruction-selector.h"
28 #include "src/compiler/js-builtin-reducer.h" 28 #include "src/compiler/js-builtin-reducer.h"
29 #include "src/compiler/js-context-relaxation.h" 29 #include "src/compiler/js-context-relaxation.h"
30 #include "src/compiler/js-context-specialization.h" 30 #include "src/compiler/js-context-specialization.h"
31 #include "src/compiler/js-frame-specialization.h" 31 #include "src/compiler/js-frame-specialization.h"
32 #include "src/compiler/js-generic-lowering.h" 32 #include "src/compiler/js-generic-lowering.h"
33 #include "src/compiler/js-global-specialization.h" 33 #include "src/compiler/js-global-specialization.h"
34 #include "src/compiler/js-inlining.h" 34 #include "src/compiler/js-inlining-heuristic.h"
35 #include "src/compiler/js-intrinsic-lowering.h" 35 #include "src/compiler/js-intrinsic-lowering.h"
36 #include "src/compiler/js-type-feedback.h" 36 #include "src/compiler/js-type-feedback.h"
37 #include "src/compiler/js-type-feedback-lowering.h" 37 #include "src/compiler/js-type-feedback-lowering.h"
38 #include "src/compiler/js-typed-lowering.h" 38 #include "src/compiler/js-typed-lowering.h"
39 #include "src/compiler/jump-threading.h" 39 #include "src/compiler/jump-threading.h"
40 #include "src/compiler/live-range-separator.h" 40 #include "src/compiler/live-range-separator.h"
41 #include "src/compiler/load-elimination.h" 41 #include "src/compiler/load-elimination.h"
42 #include "src/compiler/loop-analysis.h" 42 #include "src/compiler/loop-analysis.h"
43 #include "src/compiler/loop-peeling.h" 43 #include "src/compiler/loop-peeling.h"
44 #include "src/compiler/machine-operator-reducer.h" 44 #include "src/compiler/machine-operator-reducer.h"
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } 519 }
520 if (data->info()->is_typing_enabled()) { 520 if (data->info()->is_typing_enabled()) {
521 global_flags |= JSGlobalSpecialization::kTypingEnabled; 521 global_flags |= JSGlobalSpecialization::kTypingEnabled;
522 } 522 }
523 JSGlobalSpecialization global_specialization( 523 JSGlobalSpecialization global_specialization(
524 &graph_reducer, data->jsgraph(), global_flags, 524 &graph_reducer, data->jsgraph(), global_flags,
525 data->info()->has_global_object() 525 data->info()->has_global_object()
526 ? handle(data->info()->global_object()) 526 ? handle(data->info()->global_object())
527 : Handle<GlobalObject>(), 527 : Handle<GlobalObject>(),
528 data->info()->dependencies()); 528 data->info()->dependencies());
529 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() 529 JSInliningHeuristic inlining(&graph_reducer,
530 ? JSInliner::kGeneralInlining 530 data->info()->is_inlining_enabled()
531 : JSInliner::kRestrictedInlining, 531 ? JSInliningHeuristic::kGeneralInlining
532 temp_zone, data->info(), data->jsgraph()); 532 : JSInliningHeuristic::kRestrictedInlining,
533 temp_zone, data->info(), data->jsgraph());
533 AddReducer(data, &graph_reducer, &dead_code_elimination); 534 AddReducer(data, &graph_reducer, &dead_code_elimination);
534 AddReducer(data, &graph_reducer, &common_reducer); 535 AddReducer(data, &graph_reducer, &common_reducer);
535 if (data->info()->is_frame_specializing()) { 536 if (data->info()->is_frame_specializing()) {
536 AddReducer(data, &graph_reducer, &frame_specialization); 537 AddReducer(data, &graph_reducer, &frame_specialization);
537 } 538 }
538 if (data->info()->is_native_context_specializing()) { 539 if (data->info()->is_native_context_specializing()) {
539 AddReducer(data, &graph_reducer, &global_specialization); 540 AddReducer(data, &graph_reducer, &global_specialization);
540 } 541 }
541 AddReducer(data, &graph_reducer, &context_specialization); 542 AddReducer(data, &graph_reducer, &context_specialization);
542 AddReducer(data, &graph_reducer, &inliner); 543 AddReducer(data, &graph_reducer, &inlining);
543 graph_reducer.ReduceGraph(); 544 graph_reducer.ReduceGraph();
544 } 545 }
545 }; 546 };
546 547
547 548
548 struct TyperPhase { 549 struct TyperPhase {
549 static const char* phase_name() { return "typer"; } 550 static const char* phase_name() { return "typer"; }
550 551
551 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { 552 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) {
552 NodeVector roots(temp_zone); 553 NodeVector roots(temp_zone);
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 tcf << AsC1VRegisterAllocationData("CodeGen", 1430 tcf << AsC1VRegisterAllocationData("CodeGen",
1430 data->register_allocation_data()); 1431 data->register_allocation_data());
1431 } 1432 }
1432 1433
1433 data->DeleteRegisterAllocationZone(); 1434 data->DeleteRegisterAllocationZone();
1434 } 1435 }
1435 1436
1436 } // namespace compiler 1437 } // namespace compiler
1437 } // namespace internal 1438 } // namespace internal
1438 } // namespace v8 1439 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining-heuristic.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698