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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.dart

Issue 2832083002: dart2js: strengthen loop condition in loop body (Closed)
Patch Set: rebase Created 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 49c0059cfb8c9c964e5dc2d79d3c67c4195eee66..16c837211f05233219eb93bc172279af1cad062e 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -2393,6 +2393,10 @@ class SsaTypeConversionInserter extends HBaseVisitor
if (user is HIf) {
trueTargets?.add(user.thenBlock);
falseTargets?.add(user.elseBlock);
+ } else if (user is HLoopBranch) {
+ trueTargets?.add(user.block.successors.first);
+ // Don't insert refinements on else-branch - may be a critical edge
+ // block which we currently need to keep empty (except for phis).
} else if (user is HNot) {
collectTargets(user, falseTargets, trueTargets);
} else if (user is HPhi) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698