summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-03-08 02:21:08 +0000
committerBill Wendling <isanbard@gmail.com>2013-03-08 02:21:08 +0000
commit2d915e2c150c00eee7441b6cc60480318277339d (patch)
treecf926b25db03401c749a2af45b0ddf1273a623c7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentc4ffd66f0635b524daddcee5dc3378ed47104d8e (diff)
downloadbcm5719-llvm-2d915e2c150c00eee7441b6cc60480318277339d.tar.gz
bcm5719-llvm-2d915e2c150c00eee7441b6cc60480318277339d.zip
Revert r176154 in favor of a better approach.
Code generation makes some basic assumptions about the IR it's been given. In particular, if there is only one 'invoke' in the function, then that invoke won't be going away. However, with the advent of the `llvm.donothing' intrinsic, those invokes may go away. If all of them go away, the landing pad no longer has any users. This confuses the back-end, which asserts. This happens with SjLj exceptions, because that's the model that modifies the IR based on there being invokes, etc. in the function. Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will give us a CFG that the back-end won't be confused about. If all of the invokes in a function are removed, then the SjLj EH prepare pass won't insert the bogus code the relies upon the invokes being there. <rdar://problem/13228754&13316637> llvm-svn: 176677
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 9a0bd235d7e..33d100eb3a0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1872,13 +1872,6 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
visitInlineAsm(&I);
else if (Fn && Fn->isIntrinsic()) {
assert(Fn->getIntrinsicID() == Intrinsic::donothing);
- // If donothing has a landingpad, we should clear CurrentCallSite.
- if (LandingPad) {
- MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
- unsigned CallSiteIndex = MMI.getCurrentCallSite();
- if (CallSiteIndex)
- MMI.setCurrentCallSite(0);
- }
// Ignore invokes to @llvm.donothing: jump directly to the next BB.
} else
LowerCallTo(&I, getValue(Callee), false, LandingPad);
OpenPOWER on IntegriCloud