- MarkReachableFrom(&F.getEntryBlock(), Reachable);
-
- // Mark any address-taken blocks. We don't want codegen to delete these
- // because the address may already be referenced by another function and the
- // label may be referenced.
- for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
- if (I->hasAddressTaken() && !Reachable.count(I))
- MarkReachableFrom(I, Reachable);
+ for (BasicBlock *BB : depth_first_ext(&F, Reachable))
+ (void)BB/* Mark all reachable blocks */;