[LLVMdev] Is LLVM expressive enough to represent asynchronous exceptions?
sohail at taggedtype.net
Sun Jun 12 21:39:06 PDT 2011
On 11-06-12 8:53 PM, John McCall wrote:
>> > The CFG point is a valid point. In what I've read on the topic so far
>> > (yay Internet), it seems like the CFG would have to represent the fact
>> > that control can jump to a handler after nearly every instruction in the
>> > presence of async exceptions. The Hotspot compiler probably does this.
>> > Maybe Bill knows for sure?
> Asynchronous exceptions in Java are cooperative: execution isn't
> necessarily interruptable at an arbitrary point. I assume this is
> represented internally in Hotspot's IR by ensuring that every code
> sequence performs a synchronous check for async exceptions after
> a bounded amount of computation completes. By contrast,
> asynchronous exceptions from, say, signal handlers are not
This is true.
So how could you represent this in a CFG? Is it enough to assume that
signals can occur only after every instruction? Should you represent it
in a CFG?
What else can you do?!
Sorry, more questions than answers...
More information about the llvm-dev