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

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

Issue 904763003: Redesign inlining interval computation. (Closed) Base URL: http://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_compiler.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 GrowableArray<intptr_t>* caller_inline_id);
21 22
22 // The flow graph is destructively updated upon inlining. 23 // The flow graph is destructively updated upon inlining.
23 void Inline(); 24 void Inline();
24 25
25 // Compute graph info if it was not already computed or if 'force' is true. 26 // Compute graph info if it was not already computed or if 'force' is true.
26 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false); 27 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false);
27 static void SetInliningId(const FlowGraph& flow_graph, intptr_t inlining_id); 28 static void SetInliningId(FlowGraph* flow_graph, intptr_t inlining_id);
28 29
29 bool AlwaysInline(const Function& function); 30 bool AlwaysInline(const Function& function);
30 31
31 FlowGraph* flow_graph() const { return flow_graph_; } 32 FlowGraph* flow_graph() const { return flow_graph_; }
32 intptr_t NextInlineId(const Function& function); 33 intptr_t NextInlineId(const Function& function, intptr_t caller_id);
33 34
34 bool trace_inlining() const { return trace_inlining_; } 35 bool trace_inlining() const { return trace_inlining_; }
35 36
36 private: 37 private:
37 friend class CallSiteInliner; 38 friend class CallSiteInliner;
38 39
39 FlowGraph* flow_graph_; 40 FlowGraph* flow_graph_;
40 GrowableArray<const Function*>* inline_id_to_function_; 41 GrowableArray<const Function*>* inline_id_to_function_;
42 GrowableArray<intptr_t>* caller_inline_id_;
41 const bool trace_inlining_; 43 const bool trace_inlining_;
42 44
43 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); 45 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner);
44 }; 46 };
45 47
46 } // namespace dart 48 } // namespace dart
47 49
48 #endif // VM_FLOW_GRAPH_INLINER_H_ 50 #endif // VM_FLOW_GRAPH_INLINER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698