[LLVMdev] RFC: New Exception Handling Proposal

Jay Foad jay.foad at gmail.com
Tue Nov 24 05:42:56 PST 2009


>> Are you saying that, in the LLVM IR, it would be legal to have an
>> llvm.eh.exception that *isn't* dominated by convokes (because there's
>> a direct branch to that catch block), and in that case the call
>> returns an undefined value?
>
> this is already the case (with invoke substituted for convoke).

Good to know. It would be nice if this was clearly documented!

>> And it would be up to codegen to "peel it out into its own basic block"?
>
> Not sure what that means?

I was trying to work out what Bill meant by this:

> The only other problem I can see is if code branches into a catch block. It's gross, but could happen. In that case, the llvm.eh.exception should *not* be executed, because it's metadata constructed by the compiler, not user code. It would have to be peeled out into its own basic block in such instances.

What exactly would be "peeled out into its own basic block", by whom,
at what stage of the compilation process?

Thanks,
Jay.




More information about the llvm-dev mailing list