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

Side by Side Diff: runtime/vm/compiler/backend/inliner.h

Issue 2994283002: [VM-Compiler] Don't inline if we don't have inlining budget enough to fully inline.
Patch Set: Do InliningDecision the way Slava suggested Created 3 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
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/compiler/backend/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 RUNTIME_VM_COMPILER_BACKEND_INLINER_H_ 5 #ifndef RUNTIME_VM_COMPILER_BACKEND_INLINER_H_
6 #define RUNTIME_VM_COMPILER_BACKEND_INLINER_H_ 6 #define RUNTIME_VM_COMPILER_BACKEND_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
(...skipping 14 matching lines...) Expand all
25 class FlowGraphInliner : ValueObject { 25 class FlowGraphInliner : ValueObject {
26 public: 26 public:
27 FlowGraphInliner(FlowGraph* flow_graph, 27 FlowGraphInliner(FlowGraph* flow_graph,
28 GrowableArray<const Function*>* inline_id_to_function, 28 GrowableArray<const Function*>* inline_id_to_function,
29 GrowableArray<TokenPosition>* inline_id_to_token_pos, 29 GrowableArray<TokenPosition>* inline_id_to_token_pos,
30 GrowableArray<intptr_t>* caller_inline_id, 30 GrowableArray<intptr_t>* caller_inline_id,
31 bool use_speculative_inlining, 31 bool use_speculative_inlining,
32 GrowableArray<intptr_t>* inlining_black_list, 32 GrowableArray<intptr_t>* inlining_black_list,
33 Precompiler* precompiler); 33 Precompiler* precompiler);
34 34
35 // The flow graph is destructively updated upon inlining. 35 // The flow graph is destructively updated upon inlining. Returns the max
36 void Inline(); 36 // depth that we inlined.
37 int Inline();
37 38
38 // Compute graph info if it was not already computed or if 'force' is true. 39 // Compute graph info if it was not already computed or if 'force' is true.
39 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false); 40 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false);
40 static void SetInliningId(FlowGraph* flow_graph, intptr_t inlining_id); 41 static void SetInliningId(FlowGraph* flow_graph, intptr_t inlining_id);
41 42
42 bool AlwaysInline(const Function& function); 43 bool AlwaysInline(const Function& function);
43 44
44 FlowGraph* flow_graph() const { return flow_graph_; } 45 FlowGraph* flow_graph() const { return flow_graph_; }
45 intptr_t NextInlineId(const Function& function, 46 intptr_t NextInlineId(const Function& function,
46 TokenPosition tp, 47 TokenPosition tp,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const bool use_speculative_inlining_; 82 const bool use_speculative_inlining_;
82 GrowableArray<intptr_t>* inlining_black_list_; 83 GrowableArray<intptr_t>* inlining_black_list_;
83 Precompiler* precompiler_; 84 Precompiler* precompiler_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); 86 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner);
86 }; 87 };
87 88
88 } // namespace dart 89 } // namespace dart
89 90
90 #endif // RUNTIME_VM_COMPILER_BACKEND_INLINER_H_ 91 #endif // RUNTIME_VM_COMPILER_BACKEND_INLINER_H_
OLDNEW
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/compiler/backend/inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698