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

John McCall rjmccall at apple.com
Mon Jun 13 16:33:25 PDT 2011


On Jun 13, 2011, at 3:43 PM, Andrew Trick wrote:
> Optimizing across an exceptional control edge is not awkward at all because dominance properties hold within an extended basic block. Most current LLVM transforms can be easily adapted to operate on an EBB. You mainly need a slightly smarter local instruction iterator. The same cannot be said about teaching passes, and the people who write them, to understand implicit control flow edges "within" blocks.

...what on earth are you imagining is being proposed here?  Basic blocks remain single-entry, and for the purposes of dominance they're single-exit in exactly the same way that LLVM's current basic blocks are single-exit:  there are at most two exit points, whose location does not depend on the instructions in the "body" of the block.  Dominance is not fundamentally changed.  In particular, the most important property by far — transitivity of dominance through non-phis — still holds.

And yes, working with invoke instructions is annoying, in part because of the possibility that the normal edge is critical, which is an invented problem forced on us by the terminator representation.

John.



More information about the llvm-dev mailing list