[llvm-commits] [llvm] r138697 - /llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Bill Wendling
isanbard at gmail.com
Fri Aug 26 21:40:37 PDT 2011
Author: void
Date: Fri Aug 26 23:40:37 2011
New Revision: 138697
URL: http://llvm.org/viewvc/llvm-project?rev=138697&view=rev
Log:
These splits should be done whether they are critical edges or not.
Modified:
llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=138697&r1=138696&r2=138697&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Fri Aug 26 23:40:37 2011
@@ -145,14 +145,10 @@
if (isa<PHINode>(II->getUnwindDest()->begin())) {
// FIXME: New EH - This if-condition will be always true in the new scheme.
if (II->getUnwindDest()->isLandingPad()) {
- if (isCriticalEdge(II, 1)) {
- SmallVector<BasicBlock*, 2> NewBBs;
- SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(),
- ".1", ".2", this, NewBBs);
- LPadSuccMap[II] = *succ_begin(NewBBs[0]);
- } else {
- LPadSuccMap[II] = II->getUnwindDest();
- }
+ SmallVector<BasicBlock*, 2> NewBBs;
+ SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(),
+ ".1", ".2", this, NewBBs);
+ LPadSuccMap[II] = *succ_begin(NewBBs[0]);
} else {
SplitCriticalEdge(II, 1, this);
}
@@ -206,14 +202,10 @@
// FIXME: New EH - This if-condition will be always true in the new scheme.
if (II->getUnwindDest()->isLandingPad()) {
- if (isCriticalEdge(II, 1)) {
- SmallVector<BasicBlock*, 2> NewBBs;
- SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(),
- ".1", ".2", this, NewBBs);
- LPadSuccMap[II] = *succ_begin(NewBBs[0]);
- } else {
- LPadSuccMap[II] = II->getUnwindDest();
- }
+ SmallVector<BasicBlock*, 2> NewBBs;
+ SplitLandingPadPredecessors(II->getUnwindDest(), II->getParent(),
+ ".1", ".2", this, NewBBs);
+ LPadSuccMap[II] = *succ_begin(NewBBs[0]);
} else {
SplitCriticalEdge(II, 1, this);
}
More information about the llvm-commits
mailing list