[llvm-commits] [llvm] r139236 - in /llvm/trunk: include/llvm/Intrinsics.td test/Transforms/GVN/2011-09-07-TypeIdFor.ll
Duncan Sands
baldrick at free.fr
Fri Sep 9 00:52:40 PDT 2011
Hi John,
>> 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'.
thanks for pointing this out. I've now marked it 'const'.
Ciao, Duncan.
More information about the llvm-commits
mailing list