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

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

Issue 905363002: Add --print-flow-graph-filter to allow filtering debugging output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('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 #ifndef VM_FLOW_GRAPH_INLINER_H_ 5 #ifndef VM_FLOW_GRAPH_INLINER_H_
6 #define VM_FLOW_GRAPH_INLINER_H_ 6 #define VM_FLOW_GRAPH_INLINER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 class Field; 13 class Field;
14 class FlowGraph; 14 class FlowGraph;
15 class Function; 15 class Function;
16 16
17 class FlowGraphInliner : ValueObject { 17 class FlowGraphInliner : ValueObject {
18 public: 18 public:
19 FlowGraphInliner(FlowGraph* flow_graph, 19 FlowGraphInliner(FlowGraph* flow_graph,
20 GrowableArray<const Function*>* inline_id_to_function) 20 GrowableArray<const Function*>* inline_id_to_function);
21 : flow_graph_(flow_graph), inline_id_to_function_(inline_id_to_function) {
22 }
23 21
24 // The flow graph is destructively updated upon inlining. 22 // The flow graph is destructively updated upon inlining.
25 void Inline(); 23 void Inline();
26 24
27 // Compute graph info if it was not already computed or if 'force' is true. 25 // Compute graph info if it was not already computed or if 'force' is true.
28 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false); 26 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false);
29 static void SetInliningId(const FlowGraph& flow_graph, intptr_t inlining_id); 27 static void SetInliningId(const FlowGraph& flow_graph, intptr_t inlining_id);
30 28
31 static bool AlwaysInline(const Function& function); 29 bool AlwaysInline(const Function& function);
32 30
33 FlowGraph* flow_graph() const { return flow_graph_; } 31 FlowGraph* flow_graph() const { return flow_graph_; }
34 intptr_t NextInlineId(const Function& function); 32 intptr_t NextInlineId(const Function& function);
35 33
34 bool trace_inlining() const { return trace_inlining_; }
35
36 private: 36 private:
37 friend class CallSiteInliner; 37 friend class CallSiteInliner;
38 38
39 FlowGraph* flow_graph_; 39 FlowGraph* flow_graph_;
40 GrowableArray<const Function*>* inline_id_to_function_; 40 GrowableArray<const Function*>* inline_id_to_function_;
41 const bool trace_inlining_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); 43 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner);
43 }; 44 };
44 45
45 } // namespace dart 46 } // namespace dart
46 47
47 #endif // VM_FLOW_GRAPH_INLINER_H_ 48 #endif // VM_FLOW_GRAPH_INLINER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698