Restrict the definition of loop preheader to avoid EH blocks
Differential Revision: https://reviews.llvm.org/D34487 llvm-svn: 306070
This commit is contained in:
@@ -228,6 +228,12 @@ LLVM_DUMP_METHOD void MachineBasicBlock::dump() const {
|
||||
}
|
||||
#endif
|
||||
|
||||
bool MachineBasicBlock::isLegalToHoistInto() const {
|
||||
if (isReturnBlock() || hasEHPadSuccessor())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
StringRef MachineBasicBlock::getName() const {
|
||||
if (const BasicBlock *LBB = getBasicBlock())
|
||||
return LBB->getName();
|
||||
|
||||
Reference in New Issue
Block a user