Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (revision 17466) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (working copy) |
| @@ -40,14 +40,6 @@ |
| visitDominatorTree(graph); |
| } |
| - /** |
| - * Return whether the instructions do not belong to a loop or |
| - * belong to the same loop. |
| - */ |
| - bool notInLoopOrInSameLoop(HInstruction one, HInstruction two) { |
| - return one.block.enclosingLoopHeader == two.block.enclosingLoopHeader; |
| - } |
| - |
| void analyzeInputs(HInstruction user, int start) { |
| List<HInstruction> inputs = user.inputs; |
| for (int i = start; i < inputs.length; i++) { |
| @@ -62,7 +54,7 @@ |
| // Only consider a pure input if it is in the same loop. |
| // Otherwise, we might move GVN'ed instruction back into the |
| // loop. |
| - if (notInLoopOrInSameLoop(user, input)) { |
| + if (user.bothNotInLoopOrInSameLoop(input)) { |
|
kasperl
2013/01/24 09:03:51
With this name, it seems weird to call this one of
ngeoffray
2013/01/24 10:41:30
Done.
|
| // Move it closer to [user], so that instructions in |
| // between do not prevent making it generate at use site. |
| input.moveBefore(user); |