We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9b32a5 commit bace1a6Copy full SHA for bace1a6
include/swift/SILOptimizer/Utils/BasicBlockOptUtils.h
@@ -53,6 +53,16 @@ class ReachableBlocks {
53
return visited.contains(block);
54
}
55
56
+ bool hasUnreachableBlocks() const {
57
+ assert(isComputed);
58
+ for (auto &block : *visited.getFunction()) {
59
+ if (!isReachable(&block)) {
60
+ return true;
61
+ }
62
63
+ return false;
64
65
+
66
private:
67
/// Invoke \p visitor for each reachable block in \p f in worklist order (at
68
/// least one predecessor has been visited--defs are always visited before
0 commit comments