Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (revision 22171) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (working copy) |
| @@ -58,6 +58,16 @@ |
| // between do not prevent making it generate at use site. |
| input.moveBefore(user); |
| pureInputs.add(input); |
| + // Previous computations done on [input] are now invalid |
| + // because we moved [input] to another place. So all |
| + // non-nure, non-code motion invariant, instructions need |
|
ahe
2013/04/30 20:06:25
nure -> pure
|
| + // to be removed from the [generateAtUseSite] set. |
| + input.inputs.forEach((instruction) { |
| + if (!instruction.isCodeMotionInvariant() |
| + && !instruction.isPure()) { |
| + generateAtUseSite.remove(instruction); |
| + } |
| + }); |
| // Visit the pure input now so that the expected inputs |
| // are after the expected inputs of [user]. |
| input.accept(this); |
| @@ -160,7 +170,6 @@ |
| } |
| block.last.accept(this); |
| - bool dontVisitPure = false; |
| for (HInstruction instruction = block.last.previous; |
| instruction != null; |
| instruction = instruction.previous) { |