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

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

Issue 18111006: Collect edge count profiling data and reorder basic blocks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 3 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/block_scheduler.h"
7 #include "vm/compiler.h" 8 #include "vm/compiler.h"
8 #include "vm/flags.h" 9 #include "vm/flags.h"
9 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
10 #include "vm/flow_graph_builder.h" 11 #include "vm/flow_graph_builder.h"
11 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
12 #include "vm/flow_graph_optimizer.h" 13 #include "vm/flow_graph_optimizer.h"
13 #include "vm/il_printer.h" 14 #include "vm/il_printer.h"
14 #include "vm/intrinsifier.h" 15 #include "vm/intrinsifier.h"
15 #include "vm/longjump.h" 16 #include "vm/longjump.h"
16 #include "vm/object.h" 17 #include "vm/object.h"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 function.set_is_inlinable(false); 586 function.set_is_inlinable(false);
586 TRACE_INLINING(OS::Print(" Bailout: optional arg mismatch\n")); 587 TRACE_INLINING(OS::Print(" Bailout: optional arg mismatch\n"));
587 return false; 588 return false;
588 } 589 }
589 } 590 }
590 591
591 // After treating optional parameters the actual/formal count must match. 592 // After treating optional parameters the actual/formal count must match.
592 ASSERT(arguments->length() == function.NumParameters()); 593 ASSERT(arguments->length() == function.NumParameters());
593 ASSERT(param_stubs->length() == callee_graph->parameter_count()); 594 ASSERT(param_stubs->length() == callee_graph->parameter_count());
594 595
596 BlockScheduler block_scheduler(callee_graph);
597 block_scheduler.AssignEdgeWeights();
598
595 { 599 {
596 TimerScope timer(FLAG_compiler_stats, 600 TimerScope timer(FLAG_compiler_stats,
597 &CompilerStats::graphinliner_ssa_timer, 601 &CompilerStats::graphinliner_ssa_timer,
598 isolate); 602 isolate);
599 // Compute SSA on the callee graph, catching bailouts. 603 // Compute SSA on the callee graph, catching bailouts.
600 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), 604 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(),
601 param_stubs); 605 param_stubs);
602 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 606 DEBUG_ASSERT(callee_graph->VerifyUseLists());
603 } 607 }
604 608
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 OS::Print("After Inlining of %s\n", flow_graph_-> 1447 OS::Print("After Inlining of %s\n", flow_graph_->
1444 parsed_function().function().ToFullyQualifiedCString()); 1448 parsed_function().function().ToFullyQualifiedCString());
1445 FlowGraphPrinter printer(*flow_graph_); 1449 FlowGraphPrinter printer(*flow_graph_);
1446 printer.PrintBlocks(); 1450 printer.PrintBlocks();
1447 } 1451 }
1448 } 1452 }
1449 } 1453 }
1450 } 1454 }
1451 1455
1452 } // namespace dart 1456 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698