It's not possible to insert code immediately after an invoke in the
authorDan Gohman <gohman@apple.com>
Fri, 23 Mar 2012 17:47:54 +0000 (17:47 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 23 Mar 2012 17:47:54 +0000 (17:47 +0000)
commitfbab4a8c8a142502b7cdeb7112366f8560a94cec
tree05a89aa34493a306669ab20028d3b135d58383a8
parent8e1fc56b2496270d1d6040cb648eef5d5aeb6079
It's not possible to insert code immediately after an invoke in the
same basic block, and it's not safe to insert code in the successor
blocks if the edges are critical edges. Splitting those edges is
possible, but undesirable, especially on the unwind side. Instead,
make the bottom-up code motion to consider invokes to be part of
their successor blocks, rather than part of their parent blocks, so
that it doesn't push code past them and onto the edges. This fixes
PR12307.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153343 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ObjCARC.cpp
test/Transforms/ObjCARC/invoke.ll