[llvm-commits] [llvm] r142920 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp
Duncan Sands
baldrick at free.fr
Tue Oct 25 05:30:22 PDT 2011
Author: baldrick
Date: Tue Oct 25 07:30:22 2011
New Revision: 142920
URL: http://llvm.org/viewvc/llvm-project?rev=142920&view=rev
Log:
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>
Modified:
llvm/trunk/lib/CodeGen/BranchFolding.cpp
Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=142920&r1=142919&r2=142920&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Tue Oct 25 07:30:22 2011
@@ -913,8 +913,7 @@
// 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
More information about the llvm-commits
mailing list