[LLVMdev] RFC: Exception Handling Proposal II

Duncan Sands baldrick at free.fr
Wed Nov 24 23:51:58 PST 2010


>> I hadn't quite got the role of the invoke in your intermediary model,
>> now I get it. ;)
>>
>> I think we should ultimately treat calls like instructions and not
>> mark them in any specific way regarding EH.
>>
> I totally agree. :-)

I think everyone wants to get rid of invoke, but that is hard.  One problem
is that you want to keep the SSA property "definitions dominate uses".  Now
suppose you have a basic block

   bb: [when throws, branch to XYZ]
      ...
      %x = ... (define %x)
      ...

   XYZ:
      ...use %x...

If you got to XYZ because an instruction threw an exception before %x was
defined, then in XYZ you are using %x which was never defined.  In effect
the definition of %x in bb does not dominate the use in XYZ.  I think the
solution is to say that in XYZ you are not allowed to use any values defined
in bb: in the dominator tree, bb is not considered to dominate XYZ.

These kind of issues touch fundamental design points of LLVM, so need to be
dealt with carefully.

Ciao,

Duncan.



More information about the llvm-dev mailing list