[LLVMdev] Does nounwind have semantics?
Krzysztof Parzyszek
kparzysz at codeaurora.org
Fri Jul 26 06:38:49 PDT 2013
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
More information about the llvm-dev
mailing list