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

Duncan Sands baldrick at free.fr
Tue Jun 14 01:07:17 PDT 2011


Hi Andrew,

> No. Duncan suggested that he could hitch a ride with us through France. The problem is, we're not driving to Spain at all and there doesn't appear to be any place to transfer.
>
> The point is, you're not going to be able to leverage most of a CFG-based optimizing compiler if don't use the CFG to express control flow.

when Chris first came up with his proposal for attaching exception handling info
to basic blocks, I argued that it would be better to keep explicit control flow
by having lots of basic blocks.  This has costs.  First off, you get a lot of
control flow edges, which can cause some optimizers to take a long time.  This
could hopefully be dealt with by having such algorithms ignore/spend less time
on exception handling cfg edges.  Secondly, you use up more memory by allocating
a lot of basic blocks.  This could be mitigated by internally using "lightweight
basic blocks" to represent all the little basic blocks that would have all been
part of one big basic block if you weren't allowing trapping instructions.  But
in the end I either became convinced that Chris was right or just gave up - I no
longer recall which :)

Ciao, Duncan.



More information about the llvm-dev mailing list