[LLVMdev] Is LLVM expressive enough to represent asynchronous exceptions?

Bill Wendling wendling at apple.com
Sun Jun 12 15:13:11 PDT 2011


On Jun 12, 2011, at 2:14 PM, Cameron Zwarich <zwarich at apple.com> wrote:

> On Jun 12, 2011, at 1:25 AM, Duncan Sands wrote:
> 
>> Hi Sohail,
>> 
>>> Is LLVM expressive enough to represent asynchronous exceptions?
>> 
>> not currently.  The first step in this direction is to get rid of the invoke
>> instruction and attach exception handling information to basic blocks.  See
>> http://nondot.org/sabre/LLVMNotes/ExceptionHandlingChanges.txt
>> for a discussion.
> 
> Is this really a good idea? Why have a control flow graph if it doesn't actually capture control flow? There are lots of compilers for languages with more pervasive exceptions that represent them explicitly, e.g. the Hotspot server compiler for Java or several ML compilers (where integer overflow throws an exception). I can't see many advantages of implicit exceptions besides a nicer looking IR dump.
> 
Andy expressed a similar concern to me when I asked him about it. (He previously worked on a Java compiler.) I'm inclined to agree with him. Especially considering that we run into large problems with 'use before definition' in such a model. 

-bw



More information about the llvm-dev mailing list