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

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

Issue 1135483004: [turbofan] Add AdvancedReducer::ReplaceWithValue() method and convert JSInlining to an AdvancedRedu… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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') | test/unittests/compiler/graph-reducer-unittest.h » ('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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 }; 498 };
499 499
500 500
501 struct InliningPhase { 501 struct InliningPhase {
502 static const char* phase_name() { return "inlining"; } 502 static const char* phase_name() { return "inlining"; }
503 503
504 void Run(PipelineData* data, Zone* temp_zone) { 504 void Run(PipelineData* data, Zone* temp_zone) {
505 SourcePositionTable::Scope pos(data->source_positions(), 505 SourcePositionTable::Scope pos(data->source_positions(),
506 SourcePosition::Unknown()); 506 SourcePosition::Unknown());
507 JSInliner inliner(data->info()->is_inlining_enabled() 507 GraphReducer graph_reducer(data->graph(), temp_zone);
508 ? JSInliner::kGeneralInlining 508 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled()
509 : JSInliner::kBuiltinsInlining, 509 ? JSInliner::kGeneralInlining
510 : JSInliner::kBuiltinsInlining,
510 temp_zone, data->info(), data->jsgraph()); 511 temp_zone, data->info(), data->jsgraph());
511 GraphReducer graph_reducer(data->graph(), temp_zone);
512 AddReducer(data, &graph_reducer, &inliner); 512 AddReducer(data, &graph_reducer, &inliner);
513 graph_reducer.ReduceGraph(); 513 graph_reducer.ReduceGraph();
514 } 514 }
515 }; 515 };
516 516
517 517
518 struct TyperPhase { 518 struct TyperPhase {
519 static const char* phase_name() { return "typer"; } 519 static const char* phase_name() { return "typer"; }
520 520
521 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); } 521 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); }
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 tcf << AsC1VRegisterAllocationData("CodeGen", 1347 tcf << AsC1VRegisterAllocationData("CodeGen",
1348 data->register_allocation_data()); 1348 data->register_allocation_data());
1349 } 1349 }
1350 1350
1351 data->DeleteRegisterAllocationZone(); 1351 data->DeleteRegisterAllocationZone();
1352 } 1352 }
1353 1353
1354 } // namespace compiler 1354 } // namespace compiler
1355 } // namespace internal 1355 } // namespace internal
1356 } // namespace v8 1356 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | test/unittests/compiler/graph-reducer-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698