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

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

Issue 1140743004: Generalize builtins inlining flag to allow forced inlining of any function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment 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') | src/flag-definitions.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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 }; 496 };
497 497
498 498
499 struct InliningPhase { 499 struct InliningPhase {
500 static const char* phase_name() { return "inlining"; } 500 static const char* phase_name() { return "inlining"; }
501 501
502 void Run(PipelineData* data, Zone* temp_zone) { 502 void Run(PipelineData* data, Zone* temp_zone) {
503 GraphReducer graph_reducer(data->graph(), temp_zone); 503 GraphReducer graph_reducer(data->graph(), temp_zone);
504 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() 504 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled()
505 ? JSInliner::kGeneralInlining 505 ? JSInliner::kGeneralInlining
506 : JSInliner::kBuiltinsInlining, 506 : JSInliner::kRestrictedInlining,
507 temp_zone, data->info(), data->jsgraph()); 507 temp_zone, data->info(), data->jsgraph());
508 AddReducer(data, &graph_reducer, &inliner); 508 AddReducer(data, &graph_reducer, &inliner);
509 graph_reducer.ReduceGraph(); 509 graph_reducer.ReduceGraph();
510 } 510 }
511 }; 511 };
512 512
513 513
514 struct TyperPhase { 514 struct TyperPhase {
515 static const char* phase_name() { return "typer"; } 515 static const char* phase_name() { return "typer"; }
516 516
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 1003
1004 Run<EarlyControlReductionPhase>(); 1004 Run<EarlyControlReductionPhase>();
1005 RunPrintAndVerify("Early Control reduced", true); 1005 RunPrintAndVerify("Early Control reduced", true);
1006 1006
1007 if (info()->is_context_specializing()) { 1007 if (info()->is_context_specializing()) {
1008 // Specialize the code to the context as aggressively as possible. 1008 // Specialize the code to the context as aggressively as possible.
1009 Run<ContextSpecializerPhase>(); 1009 Run<ContextSpecializerPhase>();
1010 RunPrintAndVerify("Context specialized", true); 1010 RunPrintAndVerify("Context specialized", true);
1011 } 1011 }
1012 1012
1013 if (info()->is_builtin_inlining_enabled() || info()->is_inlining_enabled()) { 1013 Run<InliningPhase>();
1014 Run<InliningPhase>(); 1014 RunPrintAndVerify("Inlined", true);
1015 RunPrintAndVerify("Inlined", true);
1016 }
1017 1015
1018 if (FLAG_print_turbo_replay) { 1016 if (FLAG_print_turbo_replay) {
1019 // Print a replay of the initial graph. 1017 // Print a replay of the initial graph.
1020 GraphReplayPrinter::PrintReplay(data.graph()); 1018 GraphReplayPrinter::PrintReplay(data.graph());
1021 } 1019 }
1022 1020
1023 // Bailout here in case target architecture is not supported. 1021 // Bailout here in case target architecture is not supported.
1024 if (!SupportedTarget()) return Handle<Code>::null(); 1022 if (!SupportedTarget()) return Handle<Code>::null();
1025 1023
1026 if (info()->is_typing_enabled()) { 1024 if (info()->is_typing_enabled()) {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 tcf << AsC1VRegisterAllocationData("CodeGen", 1321 tcf << AsC1VRegisterAllocationData("CodeGen",
1324 data->register_allocation_data()); 1322 data->register_allocation_data());
1325 } 1323 }
1326 1324
1327 data->DeleteRegisterAllocationZone(); 1325 data->DeleteRegisterAllocationZone();
1328 } 1326 }
1329 1327
1330 } // namespace compiler 1328 } // namespace compiler
1331 } // namespace internal 1329 } // namespace internal
1332 } // namespace v8 1330 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698