Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart

Issue 14602011: Fix issue 10321 by invalidating previous "generate at use site" optimizations based on a pure instr… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/issue10321_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,15 @@
// 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 code motion invariant instructions need
+ // to be removed from the [generateAtUseSite] set.
+ input.inputs.forEach((instruction) {
+ if (!instruction.isCodeMotionInvariant()) {
+ 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 +169,6 @@
}
block.last.accept(this);
- bool dontVisitPure = false;
for (HInstruction instruction = block.last.previous;
instruction != null;
instruction = instruction.previous) {
« no previous file with comments | « no previous file | tests/language/issue10321_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698