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

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

Issue 1417043006: [turbofan] Split JSGlobalObjectSpecialization into separate class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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-native-context-specialization.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-trimmer.h" 24 #include "src/compiler/graph-trimmer.h"
25 #include "src/compiler/graph-visualizer.h" 25 #include "src/compiler/graph-visualizer.h"
26 #include "src/compiler/greedy-allocator.h" 26 #include "src/compiler/greedy-allocator.h"
27 #include "src/compiler/instruction.h" 27 #include "src/compiler/instruction.h"
28 #include "src/compiler/instruction-selector.h" 28 #include "src/compiler/instruction-selector.h"
29 #include "src/compiler/js-builtin-reducer.h" 29 #include "src/compiler/js-builtin-reducer.h"
30 #include "src/compiler/js-context-relaxation.h" 30 #include "src/compiler/js-context-relaxation.h"
31 #include "src/compiler/js-context-specialization.h" 31 #include "src/compiler/js-context-specialization.h"
32 #include "src/compiler/js-frame-specialization.h" 32 #include "src/compiler/js-frame-specialization.h"
33 #include "src/compiler/js-generic-lowering.h" 33 #include "src/compiler/js-generic-lowering.h"
34 #include "src/compiler/js-global-object-specialization.h"
34 #include "src/compiler/js-inlining-heuristic.h" 35 #include "src/compiler/js-inlining-heuristic.h"
35 #include "src/compiler/js-intrinsic-lowering.h" 36 #include "src/compiler/js-intrinsic-lowering.h"
36 #include "src/compiler/js-native-context-specialization.h" 37 #include "src/compiler/js-native-context-specialization.h"
37 #include "src/compiler/js-typed-lowering.h" 38 #include "src/compiler/js-typed-lowering.h"
38 #include "src/compiler/jump-threading.h" 39 #include "src/compiler/jump-threading.h"
39 #include "src/compiler/live-range-separator.h" 40 #include "src/compiler/live-range-separator.h"
40 #include "src/compiler/load-elimination.h" 41 #include "src/compiler/load-elimination.h"
41 #include "src/compiler/loop-analysis.h" 42 #include "src/compiler/loop-analysis.h"
42 #include "src/compiler/loop-peeling.h" 43 #include "src/compiler/loop-peeling.h"
43 #include "src/compiler/machine-operator-reducer.h" 44 #include "src/compiler/machine-operator-reducer.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 494
494 struct NativeContextSpecializationPhase { 495 struct NativeContextSpecializationPhase {
495 static const char* phase_name() { return "native context specialization"; } 496 static const char* phase_name() { return "native context specialization"; }
496 497
497 void Run(PipelineData* data, Zone* temp_zone) { 498 void Run(PipelineData* data, Zone* temp_zone) {
498 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 499 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
499 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 500 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
500 data->common()); 501 data->common());
501 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 502 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
502 data->common(), data->machine()); 503 data->common(), data->machine());
504 JSGlobalObjectSpecialization global_object_specialization(
505 &graph_reducer, data->jsgraph(),
506 data->info()->is_deoptimization_enabled()
507 ? JSGlobalObjectSpecialization::kDeoptimizationEnabled
508 : JSGlobalObjectSpecialization::kNoFlags,
509 handle(data->info()->global_object(), data->isolate()),
510 data->info()->dependencies());
503 JSNativeContextSpecialization native_context_specialization( 511 JSNativeContextSpecialization native_context_specialization(
504 &graph_reducer, data->jsgraph(), 512 &graph_reducer, data->jsgraph(),
505 data->info()->is_deoptimization_enabled() 513 data->info()->is_deoptimization_enabled()
506 ? JSNativeContextSpecialization::kDeoptimizationEnabled 514 ? JSNativeContextSpecialization::kDeoptimizationEnabled
507 : JSNativeContextSpecialization::kNoFlags, 515 : JSNativeContextSpecialization::kNoFlags,
508 handle(data->info()->global_object(), data->isolate()), 516 handle(data->info()->global_object()->native_context(),
517 data->isolate()),
509 data->info()->dependencies(), temp_zone); 518 data->info()->dependencies(), temp_zone);
510 AddReducer(data, &graph_reducer, &dead_code_elimination); 519 AddReducer(data, &graph_reducer, &dead_code_elimination);
511 AddReducer(data, &graph_reducer, &common_reducer); 520 AddReducer(data, &graph_reducer, &common_reducer);
521 AddReducer(data, &graph_reducer, &global_object_specialization);
512 AddReducer(data, &graph_reducer, &native_context_specialization); 522 AddReducer(data, &graph_reducer, &native_context_specialization);
513 graph_reducer.ReduceGraph(); 523 graph_reducer.ReduceGraph();
514 } 524 }
515 }; 525 };
516 526
517 527
518 struct InliningPhase { 528 struct InliningPhase {
519 static const char* phase_name() { return "inlining"; } 529 static const char* phase_name() { return "inlining"; }
520 530
521 void Run(PipelineData* data, Zone* temp_zone) { 531 void Run(PipelineData* data, Zone* temp_zone) {
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 tcf << AsC1VRegisterAllocationData("CodeGen", 1429 tcf << AsC1VRegisterAllocationData("CodeGen",
1420 data->register_allocation_data()); 1430 data->register_allocation_data());
1421 } 1431 }
1422 1432
1423 data->DeleteRegisterAllocationZone(); 1433 data->DeleteRegisterAllocationZone();
1424 } 1434 }
1425 1435
1426 } // namespace compiler 1436 } // namespace compiler
1427 } // namespace internal 1437 } // namespace internal
1428 } // namespace v8 1438 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698