diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2017-06-22 23:27:16 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2017-06-22 23:27:16 +0000 |
commit | d49711996f94cc73908d03d51938ffaaa40c3da9 (patch) | |
tree | 746c8477aa8c0030daf60acf094072faa3ba77d7 /llvm/lib/CodeGen | |
parent | 08b20356c3f3aa3a7442bd4c2a0d7f3bd294ad8f (diff) | |
download | bcm5719-llvm-d49711996f94cc73908d03d51938ffaaa40c3da9.tar.gz bcm5719-llvm-d49711996f94cc73908d03d51938ffaaa40c3da9.zip |
Restrict the definition of loop preheader to avoid EH blocks
Differential Revision: https://reviews.llvm.org/D34487
llvm-svn: 306070
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 590acc01008..81597afe6b0 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -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(); |