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

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

Issue 2809583002: Use off-heap data for type feedback in PolymorphicInstanceCallInstr (Closed)
Patch Set: Feedback from Slava Created 3 years, 8 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
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_JIT_OPTIMIZER_H_ 5 #ifndef RUNTIME_VM_JIT_OPTIMIZER_H_
6 #define RUNTIME_VM_JIT_OPTIMIZER_H_ 6 #define RUNTIME_VM_JIT_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 struct CidRangeTarget;
Vyacheslav Egorov (Google) 2017/04/20 16:45:33 Is this forward declaration used in this file?
erikcorry 2017/04/21 13:04:44 Gone
13 class CSEInstructionMap; 14 class CSEInstructionMap;
14 template <typename T> 15 template <typename T>
15 class GrowableArray; 16 class GrowableArray;
16 class ParsedFunction; 17 class ParsedFunction;
17 18
18 class JitOptimizer : public FlowGraphVisitor { 19 class JitOptimizer : public FlowGraphVisitor {
19 public: 20 public:
20 explicit JitOptimizer(FlowGraph* flow_graph) 21 explicit JitOptimizer(FlowGraph* flow_graph)
21 : FlowGraphVisitor(flow_graph->reverse_postorder()), 22 : FlowGraphVisitor(flow_graph->reverse_postorder()),
22 flow_graph_(flow_graph) {} 23 flow_graph_(flow_graph) {}
(...skipping 22 matching lines...) Expand all
45 } 46 }
46 47
47 private: 48 private:
48 // Attempt to build ICData for call using propagated class-ids. 49 // Attempt to build ICData for call using propagated class-ids.
49 bool TryCreateICData(InstanceCallInstr* call); 50 bool TryCreateICData(InstanceCallInstr* call);
50 51
51 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); 52 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call);
52 53
53 bool TryReplaceWithIndexedOp(InstanceCallInstr* call); 54 bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
54 55
55 void TryExpandClassesInICData(const ICData& ic_data);
56 bool LookupMethodFor(int class_id,
57 const ArgumentsDescriptor& args_desc,
58 const String& name,
59 Function* fn_return);
60
61 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); 56 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
62 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind); 57 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind);
63 58
64 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); 59 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind);
65 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); 60 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind);
66 61
67 bool TryInlineInstanceGetter(InstanceCallInstr* call); 62 bool TryInlineInstanceGetter(InstanceCallInstr* call);
68 bool TryInlineInstanceSetter(InstanceCallInstr* call, 63 bool TryInlineInstanceSetter(InstanceCallInstr* call,
69 const ICData& unary_ic_data); 64 const ICData& unary_ic_data);
70 65
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 125
131 FlowGraph* flow_graph_; 126 FlowGraph* flow_graph_;
132 127
133 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); 128 DISALLOW_COPY_AND_ASSIGN(JitOptimizer);
134 }; 129 };
135 130
136 131
137 } // namespace dart 132 } // namespace dart
138 133
139 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ 134 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698