[LLVMdev] Add a 'notrap' function attribute?

Andrew Trick atrick at apple.com
Fri Nov 1 17:16:36 PDT 2013


On Nov 1, 2013, at 3:13 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> I think that you misunderstood what I meant. If we have:
> 
> check_something();
> %x = load %ptr, !notrap
> 
> Then it could be that %ptr will never trap because check_something() will throw in all cases where the load will trap. As a result, we also need to encode a dependency between all functions that may throw (or longjmp or whatever) and the notrap metadata.

Oh, of course. I missed that. I don’t have any clever ideas. Brute force would be adding a metadata ID to the call.

We’re already talking about adding TBAA to calls though. It doesn’t solve the problem, but might handle some of the use-cases.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131101/6f107444/attachment.html>


More information about the llvm-dev mailing list