| 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 21 matching lines...) Expand all Loading... |
| 32 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the | 32 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the |
| 33 // shift can be a truncating Smi shift-left and result is always Smi. | 33 // shift can be a truncating Smi shift-left and result is always Smi. |
| 34 void TryOptimizeLeftShiftWithBitAndPattern(); | 34 void TryOptimizeLeftShiftWithBitAndPattern(); |
| 35 | 35 |
| 36 void Canonicalize(); | 36 void Canonicalize(); |
| 37 | 37 |
| 38 void EliminateDeadPhis(); | 38 void EliminateDeadPhis(); |
| 39 | 39 |
| 40 void SelectRepresentations(); | 40 void SelectRepresentations(); |
| 41 | 41 |
| 42 void PropagateSminess(); | |
| 43 | |
| 44 void InferSmiRanges(); | 42 void InferSmiRanges(); |
| 45 | 43 |
| 46 virtual void VisitStaticCall(StaticCallInstr* instr); | 44 virtual void VisitStaticCall(StaticCallInstr* instr); |
| 47 virtual void VisitInstanceCall(InstanceCallInstr* instr); | 45 virtual void VisitInstanceCall(InstanceCallInstr* instr); |
| 48 virtual void VisitRelationalOp(RelationalOpInstr* instr); | 46 virtual void VisitRelationalOp(RelationalOpInstr* instr); |
| 49 virtual void VisitEqualityCompare(EqualityCompareInstr* instr); | 47 virtual void VisitEqualityCompare(EqualityCompareInstr* instr); |
| 50 virtual void VisitBranch(BranchInstr* instr); | 48 virtual void VisitBranch(BranchInstr* instr); |
| 51 virtual void VisitStrictCompare(StrictCompareInstr* instr); | 49 virtual void VisitStrictCompare(StrictCompareInstr* instr); |
| 52 | 50 |
| 53 void InsertBefore(Instruction* next, | 51 void InsertBefore(Instruction* next, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // inputs. | 289 // inputs. |
| 292 static BranchInstr* CloneBranch(BranchInstr* branch, | 290 static BranchInstr* CloneBranch(BranchInstr* branch, |
| 293 Value* left, | 291 Value* left, |
| 294 Value* right); | 292 Value* right); |
| 295 }; | 293 }; |
| 296 | 294 |
| 297 | 295 |
| 298 } // namespace dart | 296 } // namespace dart |
| 299 | 297 |
| 300 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 298 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |