This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libffi & LLVM


Anthony Green wrote:
> The latest MacRuby version replaced libffi with LLVM for closure
> support, the result of which is 3 to 4 times performance boost:
> http://www.macruby.org/blog/2009/10/07/macruby05b1.html

I wonder if they measured the overhead for generating the closures.
If they didn't, perhaps we should.  Also, LLVM has a pretty big
footprint.  So, it's not all positive.

> I've been thinking for a while that a LLVM backend to libffi makes
> sense.  Does anybody have any thoughts or opinions on this?

It makes some sense, but I warn you: while working on Shark we've
found that the JIT interfaces to LLVM are rather unstable.  We'd be
setting libffi up for an eternal game of catch-up every time the
LLVM interfaces change.  (Perhaps not eternal: there's every chance
that as LLVM matures its JIT interface will stabilize.)

A better solution for libffi closures would be for libffi to generate
its own code, but I think that would be too much effort, given the
complexity of some of the ABIs we have to work with.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]