forked from OSchip/llvm-project
[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:
parent
f4fb5f500c
commit
e0675fb8fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue