Inlining often produces landingpad instructions with repeated
authorDuncan Sands <baldrick@free.fr>
Fri, 30 Sep 2011 13:12:16 +0000 (13:12 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 30 Sep 2011 13:12:16 +0000 (13:12 +0000)
commit0ad7b6e773b33f4c4fd3c82c8a5c10ac0597792c
tree9a2c787e5ebfc3eee5d54407b4a6722a80e51982
parentf16e2d4b2af0e5659a7523a3041175ce2a2f2338
Inlining often produces landingpad instructions with repeated
catch or repeated filter clauses.  Teach instcombine a bunch
of tricks for simplifying landingpad clauses.  Currently the
code only recognizes the GNU C++ and Ada personality functions,
but that doesn't stop it doing a bunch of "generic" transforms
which are hopefully fine for any real-world personality function.
If these "generic" transforms turn out not to be generic, they
can always be conditioned on the personality function.  Probably
someone should add the ObjC++ personality function.  I didn't as
I don't know anything about it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140852 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombine.h
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/LandingPadClauses.ll [new file with mode: 0644]