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

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

Issue 1403223003: [turbofan] Make native context specialization dependent on the typed pipeline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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.cc ('k') | 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/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 struct NativeContextSpecializationPhase { 499 struct NativeContextSpecializationPhase {
500 static const char* phase_name() { return "native context specialization"; } 500 static const char* phase_name() { return "native context specialization"; }
501 501
502 void Run(PipelineData* data, Zone* temp_zone) { 502 void Run(PipelineData* data, Zone* temp_zone) {
503 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 503 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
504 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 504 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
505 data->common()); 505 data->common());
506 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 506 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
507 data->common(), data->machine()); 507 data->common(), data->machine());
508 JSGlobalSpecialization::Flags flags = JSGlobalSpecialization::kNoFlags;
509 if (data->info()->is_deoptimization_enabled()) {
510 flags |= JSGlobalSpecialization::kDeoptimizationEnabled;
511 }
512 if (data->info()->is_typing_enabled()) {
513 flags |= JSGlobalSpecialization::kTypingEnabled;
514 }
515 JSGlobalSpecialization global_specialization( 508 JSGlobalSpecialization global_specialization(
516 &graph_reducer, data->jsgraph(), flags, 509 &graph_reducer, data->jsgraph(),
510 data->info()->is_deoptimization_enabled()
511 ? JSGlobalSpecialization::kDeoptimizationEnabled
512 : JSGlobalSpecialization::kNoFlags,
517 handle(data->info()->global_object(), data->isolate()), 513 handle(data->info()->global_object(), data->isolate()),
518 data->info()->dependencies()); 514 data->info()->dependencies());
519 AddReducer(data, &graph_reducer, &dead_code_elimination); 515 AddReducer(data, &graph_reducer, &dead_code_elimination);
520 AddReducer(data, &graph_reducer, &common_reducer); 516 AddReducer(data, &graph_reducer, &common_reducer);
521 AddReducer(data, &graph_reducer, &global_specialization); 517 AddReducer(data, &graph_reducer, &global_specialization);
522 graph_reducer.ReduceGraph(); 518 graph_reducer.ReduceGraph();
523 } 519 }
524 }; 520 };
525 521
526 522
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 tcf << AsC1VRegisterAllocationData("CodeGen", 1444 tcf << AsC1VRegisterAllocationData("CodeGen",
1449 data->register_allocation_data()); 1445 data->register_allocation_data());
1450 } 1446 }
1451 1447
1452 data->DeleteRegisterAllocationZone(); 1448 data->DeleteRegisterAllocationZone();
1453 } 1449 }
1454 1450
1455 } // namespace compiler 1451 } // namespace compiler
1456 } // namespace internal 1452 } // namespace internal
1457 } // namespace v8 1453 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698