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

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

Issue 11299011: Avoid critical edge on do/while, and do not make handleLoopInfo return conditionnaly false: block b… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 14959)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -2049,7 +2049,12 @@
conditionEndBlock = close(
new HLoopBranch(conditionInstruction, HLoopBranch.DO_WHILE_LOOP));
- conditionEndBlock.addSuccessor(loopEntryBlock); // The back-edge.
+ HBasicBlock avoidEdge = addNewBlock();
floitsch 2012/11/16 14:05:43 avoidCriticalEdge, or but comment somewhere.
ngeoffray 2012/11/16 14:14:59 Renamed to avoidCriticalEdge.
+ conditionEndBlock.addSuccessor(avoidEdge); // The back-edge.
+ open(avoidEdge);
+ close(new HGoto());
+ avoidEdge.addSuccessor(loopEntryBlock);
+
conditionExpression =
new SubExpression(conditionBlock, conditionEndBlock);
}

Powered by Google App Engine
This is Rietveld 408576698