When inlining exception handling code into another function, ensure that
authorDuncan Sands <baldrick@free.fr>
Wed, 7 Sep 2011 16:44:14 +0000 (16:44 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 7 Sep 2011 16:44:14 +0000 (16:44 +0000)
commit758ba1f4edfe2a2876c91022f921180a6dbece01
treef5198473b91cad471e497168df96b7e8908453e5
parentffa5a763444e456cee17442af603fb4ef0843bb4
When inlining exception handling code into another function, ensure that
duplicate tests are eliminated (for example if the two functions both have
a catch clause catching the same type, ensure the redundant one is removed).
Note that it would probably be safe to say that eh.typeid.for is 'const',
but since two calls to it with the same argument can give different results
(but only if the calls are in different functions), it seems more correct to
mark it only 'pure'; this doesn't get in the way of the optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139236 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Intrinsics.td
test/Transforms/GVN/2011-09-07-TypeIdFor.ll [new file with mode: 0644]