[LLVMdev] One way to support unwind on x86

Bjarke Walling bwp at bwp.dk
Tue Mar 3 11:10:48 PST 2009


Hi Nicolas,

On Tue, Mar 3, 2009 at 2:48 PM, Nicolas Geoffray
<nicolas.geoffray at lip6.fr> wrote:
>
> Bjarke Walling wrote:
>> What are these sophisticated techniques you are talking about? My time
>> frame for implementing this is, not unlimited, but fairly long. Less
>> than a year (of spare time) would be ok. I still need to feel
>> progress.
>
>
> I'm talking about this:
>
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.21.9083
>
> I don't know how difficult it would be to implement it in LLVM's codegen.

That definitely looks sophisticated. Maybe I read it wrong, but it
looks to me that LLVM is capable of doing some of it already:
Profiling (has to be setup to profile the exception path), aggressive
function inlining (on a specific code path?), turn unwind into a
branch to the landing pad. I don't know to which degree it will work
though. The method sounds exciting, but it seems to be made for
JIT-interpreting, not static compilation.

It cites some papers that actually talks about what I want to do: To
optimize the exception code path using stack unwinding while having a
(near) zero-cost overhead on the normal path. One of the papers talk
about a branch table, close to my original idea. Stack cutting is not
interesting for me, because it makes the normal code path slow. I
think it's close to what the enable-correct-eh-support flag does.

Bjarke Walling



More information about the llvm-dev mailing list