Does nounwind have semantics?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Does nounwind have semantics?

Krzysztof Parzyszek
On 7/22/2013 2:13 AM, Duncan Sands wrote:
>
> For example, you could declare every function to return
> two results, the usual one and an additional i1 result.  If the i1 value
> returned is 1 then this means that "an exception is being unwound", and the
> caller should jump to the landing pad if there is one; and if there
> isn't then
> it itself should return 1.

The major problem with this is that you would introduce explicit
instructions that would not correspond to any executable code.  In
practice it may be nearly impossible to eliminate them.
If all functions that "may-unwind" were only called via invoke, the
landing pad could simply do "resume" to pass control up the call stack.

-K

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
12