@@ -386,18 +386,18 @@ void DeadEndBlocks::compute() {
386
386
}
387
387
}
388
388
389
- // ===----------------------------------------------------------------------===//
390
- // Post Dominance Set Completion Utilities
391
- // ===----------------------------------------------------------------------===//
392
-
393
- static bool endsInUnreachable (SILBasicBlock *block) {
389
+ bool DeadEndBlocks::triviallyEndsInUnreachable (SILBasicBlock *block) {
394
390
// Handle the case where a single "unreachable" block (e.g. containing a call
395
391
// to fatalError()), is jumped to from multiple source blocks.
396
392
if (SILBasicBlock *singleSucc = block->getSingleSuccessorBlock ())
397
393
block = singleSucc;
398
394
return isa<UnreachableInst>(block->getTerminator ());
399
395
}
400
396
397
+ // ===----------------------------------------------------------------------===//
398
+ // Post Dominance Set Completion Utilities
399
+ // ===----------------------------------------------------------------------===//
400
+
401
401
void swift::findJointPostDominatingSet (
402
402
SILBasicBlock *dominatingBlock, ArrayRef<SILBasicBlock *> dominatedBlockSet,
403
403
function_ref<void (SILBasicBlock *)> inputBlocksFoundDuringWalk,
@@ -482,7 +482,7 @@ void swift::findJointPostDominatingSet(
482
482
// Ignore blocks which end in an unreachable. This is a very
483
483
// simple check, but covers most of the cases, e.g. block which
484
484
// calls fatalError().
485
- !endsInUnreachable (succBlock)) {
485
+ !DeadEndBlocks::triviallyEndsInUnreachable (succBlock)) {
486
486
assert (succBlock->getSinglePredecessorBlock () == predBlock &&
487
487
" CFG must not contain critical edge" );
488
488
// Note that since there are no critical edges in the CFG, we are
0 commit comments