Index: src/compiler/instruction.cc |
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
index 1d28a1bf36cb8024d61ba40eafb525afbd450801..c757557a0d750e97fa3ef9439679e09d280e1766 100644 |
--- a/src/compiler/instruction.cc |
+++ b/src/compiler/instruction.cc |
@@ -635,6 +635,17 @@ void InstructionSequence::ValidateEdgeSplitForm() { |
} |
} |
+void InstructionSequence::ValidateDeferredBlockExitPaths() { |
+ // A deferred block with more than one successor must have all its successors |
+ // deferred. |
+ for (const InstructionBlock* block : instruction_blocks()) { |
+ if (!block->IsDeferred() || block->SuccessorCount() <= 1) continue; |
+ for (RpoNumber successor_id : block->successors()) { |
+ CHECK(InstructionBlockAt(successor_id)->IsDeferred()); |
+ } |
+ } |
+} |
+ |
void InstructionSequence::ValidateSSA() { |
// TODO(mtrofin): We could use a local zone here instead. |
BitVector definitions(VirtualRegisterCount(), zone()); |