| OLD | NEW |
| 1 library dart2js.cps_ir.loop_invariant_branch; | 1 library dart2js.cps_ir.loop_invariant_branch; |
| 2 | 2 |
| 3 import 'cps_fragment.dart'; |
| 3 import 'cps_ir_nodes.dart'; | 4 import 'cps_ir_nodes.dart'; |
| 5 import 'loop_hierarchy.dart'; |
| 4 import 'optimizers.dart'; | 6 import 'optimizers.dart'; |
| 5 import 'loop_hierarchy.dart'; | |
| 6 import 'cps_fragment.dart'; | |
| 7 import 'redundant_join.dart' show AlphaRenamer; | 7 import 'redundant_join.dart' show AlphaRenamer; |
| 8 | 8 |
| 9 /// Hoists branches out of loops, where: | 9 /// Hoists branches out of loops, where: |
| 10 /// - the branch is at the entry point of a loop | 10 /// - the branch is at the entry point of a loop |
| 11 /// - the branch condition is loop-invariant | 11 /// - the branch condition is loop-invariant |
| 12 /// - one arm of the branch is not effectively part of the loop | 12 /// - one arm of the branch is not effectively part of the loop |
| 13 /// | 13 /// |
| 14 /// Schematically: | 14 /// Schematically: |
| 15 /// | 15 /// |
| 16 /// b = COND | 16 /// b = COND |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // in loop(i) | 243 // in loop(i) |
| 244 // | 244 // |
| 245 destroyAndReplace(branch, new InvokeContinuation(loopCase, [])); | 245 destroyAndReplace(branch, new InvokeContinuation(loopCase, [])); |
| 246 | 246 |
| 247 // Record that at least one branch was hoisted to trigger alpha renaming. | 247 // Record that at least one branch was hoisted to trigger alpha renaming. |
| 248 wasHoisted = true; | 248 wasHoisted = true; |
| 249 | 249 |
| 250 return true; | 250 return true; |
| 251 } | 251 } |
| 252 } | 252 } |
| OLD | NEW |