OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_BRANCH_OPTIMIZER_H_ | 5 #ifndef RUNTIME_VM_BRANCH_OPTIMIZER_H_ |
6 #define RUNTIME_VM_BRANCH_OPTIMIZER_H_ | 6 #define RUNTIME_VM_BRANCH_OPTIMIZER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 23 matching lines...) Expand all Loading... |
34 static bool Match(JoinEntryInstr* block); | 34 static bool Match(JoinEntryInstr* block); |
35 | 35 |
36 // Duplicate a branch while replacing its comparison's left and right | 36 // Duplicate a branch while replacing its comparison's left and right |
37 // inputs. | 37 // inputs. |
38 static BranchInstr* CloneBranch(Zone* zone, | 38 static BranchInstr* CloneBranch(Zone* zone, |
39 BranchInstr* branch, | 39 BranchInstr* branch, |
40 Value* new_left, | 40 Value* new_left, |
41 Value* new_right); | 41 Value* new_right); |
42 }; | 42 }; |
43 | 43 |
44 | |
45 // Rewrite diamond control flow patterns that materialize values to use more | 44 // Rewrite diamond control flow patterns that materialize values to use more |
46 // efficient branchless code patterns if such are supported on the current | 45 // efficient branchless code patterns if such are supported on the current |
47 // platform. | 46 // platform. |
48 class IfConverter : public AllStatic { | 47 class IfConverter : public AllStatic { |
49 public: | 48 public: |
50 static void Simplify(FlowGraph* flow_graph); | 49 static void Simplify(FlowGraph* flow_graph); |
51 }; | 50 }; |
52 | 51 |
53 } // namespace dart | 52 } // namespace dart |
54 | 53 |
55 #endif // RUNTIME_VM_BRANCH_OPTIMIZER_H_ | 54 #endif // RUNTIME_VM_BRANCH_OPTIMIZER_H_ |
OLD | NEW |