Differential Revision: https://reviews.llvm.org/D104202
//
// Resumes that are not reachable from a cleanup landing pad are considered to
// be unreachable. It’s not safe to split them out either.
+ if (BB.hasAddressTaken() || BB.isEHPad())
+ return false;
auto Term = BB.getTerminator();
- return !BB.hasAddressTaken() && !BB.isEHPad() && !isa<InvokeInst>(Term) &&
- !isa<ResumeInst>(Term);
+ return !isa<InvokeInst>(Term) && !isa<ResumeInst>(Term);
}
/// Mark \p F cold. Based on this assumption, also optimize it for minimum size.