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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10855004: Fix dominatedUsers for phis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 4 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/type_propagation_phi_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 38d94e52371636cce5e4a3b41703e16e48a78331..8899d9fe6e228fef796cb1ab7577c9528b0a700e 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -963,6 +963,17 @@ class HInstruction implements Hashable {
}
}
+ // Run through all the phis in the same block as [other] and remove them
+ // from the users set.
+ if (usersInCurrentBlock > 0) {
+ for (HPhi phi = otherBlock.phis.first; phi !== null; phi = phi.next) {
+ if (users.contains(phi)) {
+ users.remove(phi);
+ if (--usersInCurrentBlock == 0) break;
+ }
+ }
+ }
+
// Run through all the instructions before [other] and remove them
// from the users set.
if (usersInCurrentBlock > 0) {
« no previous file with comments | « no previous file | tests/language/type_propagation_phi_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698