diff options
author | Duncan Sands <baldrick@free.fr> | 2011-10-25 12:30:22 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-10-25 12:30:22 +0000 |
commit | 51583ce4b6938a44a246df65977e29e0509a7f5b (patch) | |
tree | 131906cc51db53656e569ec217771f4c4fb85336 /lib/CodeGen/BranchFolding.cpp | |
parent | f8a9eb1fa6b676468d0231d1a0ee5247b664dabb (diff) |
Revert commit 142891. Takumi bisected the tablegen miscompiles
down to this commit. Original commit message:
An MBB which branches to an EH landing pad shouldn't be considered for tail merging.
In SjLj EH, the jump to the landing pad is not done explicitly through a branch
statement. The EH landing pad is added as a successor to the throwing
BB. Because of that however, the branch folding pass could mistakenly think that
it could merge the throwing BB with another BB. This isn't safe to do.
<rdar://problem/10334833>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index 2c39f64998..75288b0934 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -913,8 +913,7 @@ bool BranchFolder::TailMergeBlocks(MachineFunction &MF) { // reinsert conditional branch only, for now TII->InsertBranch(*PBB, (TBB == IBB) ? FBB : TBB, 0, NewCond, dl); } - if (!PBB->getLandingPadSuccessor()) - MergePotentials.push_back(MergePotentialsElt(HashEndOfMBB(PBB),*P)); + MergePotentials.push_back(MergePotentialsElt(HashEndOfMBB(PBB), *P)); } } // If this is a large problem, avoid visiting the same basic blocks |