SplitCriticalEdge can sometimes split the edge from an invoke to a landing
authorJohn McCall <rjmccall@apple.com>
Thu, 9 Jun 2011 20:06:24 +0000 (20:06 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 9 Jun 2011 20:06:24 +0000 (20:06 +0000)
commit1dd94bbfa1269b1144a87f5fe9dbc04869f858b4
tree9180e95db484d1369153fa77ae8726aef4812c65
parent54c256233f8dcd29406d5fe6f8a5be79a826cef3
SplitCriticalEdge can sometimes split the edge from an invoke to a landing
pad, separating the exception and selector calls from the new lpad.  Teaching
it not to do that, or to properly adjust the CFG afterwards, is out of
scope because it would require the other edges to the landing pad to be split
as well (effectively).  Instead, just recover from the most likely cases
during inlining.  The best long-term solution is to change the exception
representation and commit to either requiring or not requiring the more
complex edge-splitting logic;  this is just a shorter-term hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132799 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/inline_invoke.ll