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

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

Issue 10375048: Don't allow phi equivalences along back-edges. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Inline before-check Created 8 years, 7 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 | « frog/tests/leg_only/regression_2913_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen_helpers.dart
diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart
index 64453d782273bd701cbabf7e79d867a67e8296ff..f03ab183a11b2641407a6f24eb406b07c9ccf451 100644
--- a/lib/compiler/implementation/ssa/codegen_helpers.dart
+++ b/lib/compiler/implementation/ssa/codegen_helpers.dart
@@ -440,14 +440,15 @@ class PhiEquivalator {
PhiEquivalator(this.equivalence, this.logicalOperations);
void analyzeGraph(HGraph graph) {
- graph.blocks.forEach((HBasicBlock block) => analyzeBlock(block));
+ graph.blocks.forEach(analyzeBlock);
}
void analyzeBlock(HBasicBlock block) {
for (HPhi phi = block.phis.first; phi !== null; phi = phi.next) {
if (!logicalOperations.containsKey(phi) &&
phi.usedBy.length == 1 &&
- phi.usedBy[0] is HPhi) {
+ phi.usedBy[0] is HPhi &&
+ phi.block.id < phi.usedBy[0].block.id) {
equivalence.makeEquivalent(phi, phi.usedBy[0]);
}
}
« no previous file with comments | « frog/tests/leg_only/regression_2913_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698