summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-10-25 12:30:22 +0000
committerDuncan Sands <baldrick@free.fr>2011-10-25 12:30:22 +0000
commit6ca458e49a3addfa7436a0c02e2a84c4a174f13a (patch)
tree113c3bea47363c8aa9c443be5423ab19d7148899
parenta370f3e34e210ff2ca4725be9fdb588e7785ab73 (diff)
downloadbcm5719-llvm-6ca458e49a3addfa7436a0c02e2a84c4a174f13a.tar.gz
bcm5719-llvm-6ca458e49a3addfa7436a0c02e2a84c4a174f13a.zip
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> llvm-svn: 142920
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 2c39f64998c..75288b0934c 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud