OLD | NEW |
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_OPTIMIZER_H_ | 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_ |
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ | 6 #define VM_FLOW_GRAPH_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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 MethodRecognizer::Kind recognized_kind); | 203 MethodRecognizer::Kind recognized_kind); |
204 | 204 |
205 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, | 205 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, |
206 Definition* left_instr, | 206 Definition* left_instr, |
207 Definition* right_instr); | 207 Definition* right_instr); |
208 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates); | 208 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates); |
209 void TryMergeMathUnary(GrowableArray<MathUnaryInstr*>* merge_candidates); | 209 void TryMergeMathUnary(GrowableArray<MathUnaryInstr*>* merge_candidates); |
210 | 210 |
211 void AppendLoadIndexedForMerged(Definition* instr, intptr_t ix, intptr_t cid); | 211 void AppendLoadIndexedForMerged(Definition* instr, intptr_t ix, intptr_t cid); |
212 | 212 |
| 213 bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind); |
| 214 |
213 FlowGraph* flow_graph_; | 215 FlowGraph* flow_graph_; |
214 | 216 |
215 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); | 217 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); |
216 }; | 218 }; |
217 | 219 |
218 | 220 |
219 // Loop invariant code motion. | 221 // Loop invariant code motion. |
220 class LICM : public ValueObject { | 222 class LICM : public ValueObject { |
221 public: | 223 public: |
222 explicit LICM(FlowGraph* flow_graph); | 224 explicit LICM(FlowGraph* flow_graph); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // Optimize spill stores inside try-blocks by identifying values that always | 389 // Optimize spill stores inside try-blocks by identifying values that always |
388 // contain a single known constant at catch block entry. | 390 // contain a single known constant at catch block entry. |
389 class TryCatchAnalyzer : public AllStatic { | 391 class TryCatchAnalyzer : public AllStatic { |
390 public: | 392 public: |
391 static void Optimize(FlowGraph* flow_graph); | 393 static void Optimize(FlowGraph* flow_graph); |
392 }; | 394 }; |
393 | 395 |
394 } // namespace dart | 396 } // namespace dart |
395 | 397 |
396 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 398 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
OLD | NEW |