Split the landing pad's edge. Then for all uses of a landingpad instruction's
authorBill Wendling <isanbard@gmail.com>
Mon, 22 Aug 2011 23:38:40 +0000 (23:38 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 22 Aug 2011 23:38:40 +0000 (23:38 +0000)
commitaef508dfc1d844bb3a4f7606f54bf4c616c10eff
tree236ff4435ff68e212a456c5ad4840c55cb490d93
parentc6788c83b491b502482bf7d9a06b403d07f9e77e
Split the landing pad's edge. Then for all uses of a landingpad instruction's
value, we insert a load of the exception object and selector object from memory,
which is where it actually resides. If it's used by a PHI node, we follow that
to where it is being used. Eventually, all landingpad instructions should have
no uses. Any PHI nodes that were associated with those landingpads should be
removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138302 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SjLjEHPrepare.cpp