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

Side by Side Diff: runtime/vm/flow_graph_inliner.cc

Issue 11092102: Avoid rediscovering blocks on each call to FlowGraph::InlineCall. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_inliner.h" 5 #include "vm/flow_graph_inliner.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 OS::Print("Before Inlining of %s\n", flow_graph_-> 417 OS::Print("Before Inlining of %s\n", flow_graph_->
418 parsed_function().function().ToFullyQualifiedCString()); 418 parsed_function().function().ToFullyQualifiedCString());
419 FlowGraphPrinter printer(*flow_graph_); 419 FlowGraphPrinter printer(*flow_graph_);
420 printer.PrintBlocks(); 420 printer.PrintBlocks();
421 } 421 }
422 422
423 CallSiteInliner inliner(flow_graph_); 423 CallSiteInliner inliner(flow_graph_);
424 inliner.InlineCalls(); 424 inliner.InlineCalls();
425 425
426 if (inliner.inlined()) { 426 if (inliner.inlined()) {
427 flow_graph_->RepairGraphAfterInlining();
427 if (FLAG_trace_inlining) { 428 if (FLAG_trace_inlining) {
428 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor()); 429 OS::Print("Inlining growth factor: %f\n", inliner.GrowthFactor());
429 if (FLAG_print_flow_graph) { 430 if (FLAG_print_flow_graph) {
430 OS::Print("After Inlining of %s\n", flow_graph_-> 431 OS::Print("After Inlining of %s\n", flow_graph_->
431 parsed_function().function().ToFullyQualifiedCString()); 432 parsed_function().function().ToFullyQualifiedCString());
432 FlowGraphPrinter printer(*flow_graph_); 433 FlowGraphPrinter printer(*flow_graph_);
433 printer.PrintBlocks(); 434 printer.PrintBlocks();
434 } 435 }
435 } 436 }
436 } 437 }
437 } 438 }
438 439
439 } // namespace dart 440 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698