[Sink] Don't check BB.empty()

As an invariant, BasicBlocks cannot be empty when passed to a transform.
This is not the case for MachineBasicBlocks and the Sink pass was ported
from the MachineSink pass which would explain the check's existence.

llvm-svn: 251057
This commit is contained in:
David Majnemer 2015-10-22 20:29:08 +00:00
parent f4fb5f500c
commit e0675fb8fb
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ bool Sinking::runOnFunction(Function &F) {
bool Sinking::ProcessBlock(BasicBlock &BB) {
// Can't sink anything out of a block that has less than two successors.
if (BB.getTerminator()->getNumSuccessors() <= 1 || BB.empty()) return false;
if (BB.getTerminator()->getNumSuccessors() <= 1) return false;
// Don't bother sinking code out of unreachable blocks. In addition to being
// unprofitable, it can also lead to infinite looping, because in an