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

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

Issue 1227963005: [turbofan] Context specialization should only specialize loads/stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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-context-specialization.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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 struct InliningPhase { 491 struct InliningPhase {
492 static const char* phase_name() { return "inlining"; } 492 static const char* phase_name() { return "inlining"; }
493 493
494 void Run(PipelineData* data, Zone* temp_zone) { 494 void Run(PipelineData* data, Zone* temp_zone) {
495 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 495 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
496 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 496 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
497 data->common()); 497 data->common());
498 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 498 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
499 data->common(), data->machine()); 499 data->common(), data->machine());
500 JSContextSpecialization context_specialization( 500 JSContextSpecialization context_specialization(
501 &graph_reducer, data->jsgraph(), data->info()->context()); 501 &graph_reducer, data->jsgraph(), data->info()->is_context_specializing()
502 ? data->info()->context()
503 : MaybeHandle<Context>());
502 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), 504 JSFrameSpecialization frame_specialization(data->info()->osr_frame(),
503 data->jsgraph()); 505 data->jsgraph());
504 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() 506 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled()
505 ? JSInliner::kGeneralInlining 507 ? JSInliner::kGeneralInlining
506 : JSInliner::kRestrictedInlining, 508 : JSInliner::kRestrictedInlining,
507 temp_zone, data->info(), data->jsgraph()); 509 temp_zone, data->info(), data->jsgraph());
508 AddReducer(data, &graph_reducer, &dead_code_elimination); 510 AddReducer(data, &graph_reducer, &dead_code_elimination);
509 AddReducer(data, &graph_reducer, &common_reducer); 511 AddReducer(data, &graph_reducer, &common_reducer);
510 if (data->info()->is_frame_specializing()) { 512 if (data->info()->is_frame_specializing()) {
511 AddReducer(data, &graph_reducer, &frame_specialization); 513 AddReducer(data, &graph_reducer, &frame_specialization);
512 } 514 }
513 if (data->info()->is_context_specializing()) { 515 AddReducer(data, &graph_reducer, &context_specialization);
514 AddReducer(data, &graph_reducer, &context_specialization);
515 }
516 AddReducer(data, &graph_reducer, &inliner); 516 AddReducer(data, &graph_reducer, &inliner);
517 graph_reducer.ReduceGraph(); 517 graph_reducer.ReduceGraph();
518 } 518 }
519 }; 519 };
520 520
521 521
522 struct TyperPhase { 522 struct TyperPhase {
523 static const char* phase_name() { return "typer"; } 523 static const char* phase_name() { return "typer"; }
524 524
525 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { 525 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) {
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 tcf << AsC1VRegisterAllocationData("CodeGen", 1357 tcf << AsC1VRegisterAllocationData("CodeGen",
1358 data->register_allocation_data()); 1358 data->register_allocation_data());
1359 } 1359 }
1360 1360
1361 data->DeleteRegisterAllocationZone(); 1361 data->DeleteRegisterAllocationZone();
1362 } 1362 }
1363 1363
1364 } // namespace compiler 1364 } // namespace compiler
1365 } // namespace internal 1365 } // namespace internal
1366 } // namespace v8 1366 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-context-specialization.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698