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

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Jun 14 19:46:00 PDT 2011


On Jun 14, 2011, at 6:35 PM, Andrew Trick wrote:

> The regalloc slowdown is also counterintuitive to me. But the way GreedyRA works today, I think the small blocks force it into a more exhaustive search for split points. This could be managed.

Live range splitting scales with the number of blocks spanned by a live range in the neighborhood of blocks with register points, so your transformation wold make it slower. It forms organic regions by flood filling the CFG starting from the register points. Sort of. I see the same effect in LTO builds where more calls are inlined so live ranges span more CFG.

However, the register allocator needs the CFG to model control flow (!). Pretending that some of the edges don't exist doesn't make the problem easier. It just means that the register allocator needs to compute the real CFG before it can do anything else.

We already have a faulty machine CFG when lowering invokes - it is possible (and sometimes beneficial) to insert instructions after the call instruction that may throw. These instructions are not executed on the exceptional edge, and it is causing a lot of trouble in live range splitting.

If invokes were lowered to calls that are terminators, I could delete a lot of special-case code. (Which probably has bugs because of our relatively weak test coverage of exceptions).

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110614/5dfcc11c/attachment.html>


More information about the llvm-dev mailing list