@@ -386,18 +386,18 @@ void DeadEndBlocks::compute() {
386386 }
387387}
388388
389- // ===----------------------------------------------------------------------===//
390- // Post Dominance Set Completion Utilities
391- // ===----------------------------------------------------------------------===//
392-
393- static bool endsInUnreachable (SILBasicBlock *block) {
389+ bool DeadEndBlocks::triviallyEndsInUnreachable (SILBasicBlock *block) {
394390 // Handle the case where a single "unreachable" block (e.g. containing a call
395391 // to fatalError()), is jumped to from multiple source blocks.
396392 if (SILBasicBlock *singleSucc = block->getSingleSuccessorBlock ())
397393 block = singleSucc;
398394 return isa<UnreachableInst>(block->getTerminator ());
399395}
400396
397+ // ===----------------------------------------------------------------------===//
398+ // Post Dominance Set Completion Utilities
399+ // ===----------------------------------------------------------------------===//
400+
401401void swift::findJointPostDominatingSet (
402402 SILBasicBlock *dominatingBlock, ArrayRef<SILBasicBlock *> dominatedBlockSet,
403403 function_ref<void (SILBasicBlock *)> inputBlocksFoundDuringWalk,
@@ -482,7 +482,7 @@ void swift::findJointPostDominatingSet(
482482 // Ignore blocks which end in an unreachable. This is a very
483483 // simple check, but covers most of the cases, e.g. block which
484484 // calls fatalError().
485- !endsInUnreachable (succBlock)) {
485+ !DeadEndBlocks::triviallyEndsInUnreachable (succBlock)) {
486486 assert (succBlock->getSinglePredecessorBlock () == predBlock &&
487487 " CFG must not contain critical edge" );
488488 // Note that since there are no critical edges in the CFG, we are
0 commit comments