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

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

Issue 1756403002: VM: Add smi fast path operations for precompiled code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 9 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 | « no previous file | runtime/vm/aot_optimizer.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_AOT_OPTIMIZER_H_ 5 #ifndef VM_AOT_OPTIMIZER_H_
6 #define VM_AOT_OPTIMIZER_H_ 6 #define VM_AOT_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
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 private: 61 private:
62 // Attempt to build ICData for call using propagated class-ids. 62 // Attempt to build ICData for call using propagated class-ids.
63 bool TryCreateICData(InstanceCallInstr* call); 63 bool TryCreateICData(InstanceCallInstr* call);
64 const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid); 64 const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid);
65 65
66 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); 66 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call);
67 67
68 bool TryReplaceWithIndexedOp(InstanceCallInstr* call); 68 bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
69 69
70
71 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); 70 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
72 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind); 71 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind);
73 72
74 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); 73 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind);
75 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); 74 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind);
76 75
77 bool TryInlineInstanceGetter(InstanceCallInstr* call); 76 bool TryInlineInstanceGetter(InstanceCallInstr* call);
78 bool TryInlineInstanceSetter(InstanceCallInstr* call, 77 bool TryInlineInstanceSetter(InstanceCallInstr* call,
79 const ICData& unary_ic_data); 78 const ICData& unary_ic_data);
80 79
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, 151 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr,
153 Definition* left_instr, 152 Definition* left_instr,
154 Definition* right_instr); 153 Definition* right_instr);
155 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates); 154 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates);
156 void TryMergeMathUnary(GrowableArray<MathUnaryInstr*>* merge_candidates); 155 void TryMergeMathUnary(GrowableArray<MathUnaryInstr*>* merge_candidates);
157 156
158 void AppendExtractNthOutputForMerged(Definition* instr, intptr_t ix, 157 void AppendExtractNthOutputForMerged(Definition* instr, intptr_t ix,
159 Representation rep, intptr_t cid); 158 Representation rep, intptr_t cid);
160 bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind); 159 bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind);
161 160
162 void InstanceCallNoopt(InstanceCallInstr* instr);
163
164 RawField* GetField(intptr_t class_id, const String& field_name); 161 RawField* GetField(intptr_t class_id, const String& field_name);
165 162
166 Thread* thread() const { return flow_graph_->thread(); } 163 Thread* thread() const { return flow_graph_->thread(); }
167 Isolate* isolate() const { return flow_graph_->isolate(); } 164 Isolate* isolate() const { return flow_graph_->isolate(); }
168 Zone* zone() const { return flow_graph_->zone(); } 165 Zone* zone() const { return flow_graph_->zone(); }
169 166
170 const Function& function() const { return flow_graph_->function(); } 167 const Function& function() const { return flow_graph_->function(); }
171 168
172 bool IsBlackListedForInlining(intptr_t deopt_id); 169 bool IsBlackListedForInlining(intptr_t deopt_id);
173 170
174 FlowGraph* flow_graph_; 171 FlowGraph* flow_graph_;
175 172
176 const bool use_speculative_inlining_; 173 const bool use_speculative_inlining_;
177 174
178 GrowableArray<intptr_t>* inlining_black_list_; 175 GrowableArray<intptr_t>* inlining_black_list_;
179 176
180 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); 177 DISALLOW_COPY_AND_ASSIGN(AotOptimizer);
181 }; 178 };
182 179
183 180
184 } // namespace dart 181 } // namespace dart
185 182
186 #endif // VM_AOT_OPTIMIZER_H_ 183 #endif // VM_AOT_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/aot_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698