mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Calculate getTerminator only when necessary
Differential Revision: https://reviews.llvm.org/D104202
This commit is contained in:
parent
2f184e9475
commit
d436515539
@ -150,9 +150,10 @@ static bool mayExtractBlock(const BasicBlock &BB) {
|
||||
//
|
||||
// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user