aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorPhoebe Wang <phoebe.wang@intel.com>2023-03-29 08:20:14 +0800
committerPhoebe Wang <phoebe.wang@intel.com>2023-03-29 08:59:56 +0800
commit0efe111365ae176671e01252d24028047d807a84 (patch)
tree488e2952809357cd92bac7ea9f90916165f8f016 /llvm/lib/CodeGen/BranchFolding.cpp
parent4c55fd974b9f7e26ead646150eadfe549f27ad6f (diff)
downloadllvm-0efe111365ae176671e01252d24028047d807a84.zip
llvm-0efe111365ae176671e01252d24028047d807a84.tar.gz
llvm-0efe111365ae176671e01252d24028047d807a84.tar.bz2
Reland "[Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 2"
This reverts commit db6a979ae82410e42430e47afa488936ba8e3025. Reland D102817 without any change. The previous revert was a mistake. Differential Revision: https://reviews.llvm.org/D102817
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index d5bf62c..b5ac90c 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1207,7 +1207,7 @@ bool BranchFolder::OptimizeBranches(MachineFunction &MF) {
MadeChange |= OptimizeBlock(&MBB);
// If it is dead, remove it.
- if (MBB.pred_empty()) {
+ if (MBB.pred_empty() && !MBB.isMachineBlockAddressTaken()) {
RemoveDeadBlock(&MBB);
MadeChange = true;
++NumDeadBlocks;