Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/validate.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart |
| index e751b4dcce6c206f6edc371e919fe2656978e10c..5d916194880b1fcb283317545dea560030820c52 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ssa/validate.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/validate.dart |
| @@ -36,7 +36,16 @@ class HValidator extends HInstructionVisitor { |
| markInvalid("If node without two successors"); |
| } |
| if (block.last is HConditionalBranch && block.successors.length != 2) { |
| - markInvalid("Conditional node without two successors"); |
| + markInvalid("Conditional node without two successors"); |
| + } |
| + if (block.last is HLoopBranch) { |
|
ngeoffray
2014/06/24 15:45:00
Why just limiting to HLoopBranch? A generic critic
floitsch
2014/06/24 18:29:43
Done.
|
| + // Assert that the block we inserted to avoid critical edges satisfies |
| + // our assumptions. That is, it must not contain any instructions |
| + // (although it may contain phy-updates). |
|
ngeoffray
2014/06/24 15:45:01
phy -> phi
floitsch
2014/06/24 18:29:43
Done.
|
| + HBasicBlock avoidCriticalEdgeBlock = block.successors.last; |
| + if (avoidCriticalEdgeBlock.first is! HGoto) { |
| + markInvalid("Critical edge block contains instructions"); |
| + } |
| } |
| if (block.last is HGoto && block.successors.length != 1) { |
| markInvalid("Goto node with not exactly one successor"); |