[llvm-commits] [llvm] r139236 - in /llvm/trunk: include/llvm/Intrinsics.td test/Transforms/GVN/2011-09-07-TypeIdFor.ll

John McCall rjmccall at apple.com
Thu Sep 8 12:22:29 PDT 2011


On Sep 7, 2011, at 9:44 AM, Duncan Sands wrote:
> Author: baldrick
> Date: Wed Sep  7 11:44:14 2011
> New Revision: 139236
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=139236&view=rev
> Log:
> 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.

It could if there were an intervening cleanup.  I see no reason not to mark it 'const'.

John.



More information about the llvm-commits mailing list