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

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

Issue 11035009: Enable inlining of control flow, increase code heap size 12 -> 18Mb (note that code will be moved t… (Closed) Base URL: http://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
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/heap.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) 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/assert.h" 7 #include "vm/assert.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
11 #include "vm/flow_graph_builder.h" 11 #include "vm/flow_graph_builder.h"
12 #include "vm/flow_graph_optimizer.h" 12 #include "vm/flow_graph_optimizer.h"
13 #include "vm/il_printer.h" 13 #include "vm/il_printer.h"
14 #include "vm/intrinsifier.h" 14 #include "vm/intrinsifier.h"
15 #include "vm/longjump.h" 15 #include "vm/longjump.h"
16 #include "vm/object.h" 16 #include "vm/object.h"
17 #include "vm/object_store.h" 17 #include "vm/object_store.h"
18 18
19 namespace dart { 19 namespace dart {
20 20
21 DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining"); 21 DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining");
22 DEFINE_FLAG(charp, inlining_filter, NULL, "Inline only in named function"); 22 DEFINE_FLAG(charp, inlining_filter, NULL, "Inline only in named function");
23 DEFINE_FLAG(int, inlining_size_threshold, 250, 23 DEFINE_FLAG(int, inlining_size_threshold, 250,
24 "Inline only functions with up to threshold instructions"); 24 "Inline only functions with up to threshold instructions");
25 DEFINE_FLAG(int, inlining_growth_factor, 3, 25 DEFINE_FLAG(int, inlining_growth_factor, 3,
26 "Stop inlining when a function grows by the factor"); 26 "Stop inlining when a function grows by the factor");
27 DEFINE_FLAG(bool, inline_control_flow, false, 27 DEFINE_FLAG(bool, inline_control_flow, true,
28 "Inline functions with control flow."); 28 "Inline functions with control flow.");
29 DECLARE_FLAG(bool, print_flow_graph); 29 DECLARE_FLAG(bool, print_flow_graph);
30 DECLARE_FLAG(int, deoptimization_counter_threshold); 30 DECLARE_FLAG(int, deoptimization_counter_threshold);
31 31
32 #define TRACE_INLINING(statement) \ 32 #define TRACE_INLINING(statement) \
33 do { \ 33 do { \
34 if (FLAG_trace_inlining) statement; \ 34 if (FLAG_trace_inlining) statement; \
35 } while (false) 35 } while (false)
36 36
37 37
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 OS::Print("After Inlining of %s\n", flow_graph_-> 357 OS::Print("After Inlining of %s\n", flow_graph_->
358 parsed_function().function().ToFullyQualifiedCString()); 358 parsed_function().function().ToFullyQualifiedCString());
359 FlowGraphPrinter printer(*flow_graph_); 359 FlowGraphPrinter printer(*flow_graph_);
360 printer.PrintBlocks(); 360 printer.PrintBlocks();
361 } 361 }
362 } 362 }
363 } 363 }
364 } 364 }
365 365
366 } // namespace dart 366 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698