[PATCH][llvm-c] Expose MC JIT

Amara Emerson amara.emerson at arm.com
Wed Apr 24 01:50:25 PDT 2013


> Agreed that the LLVM should have the ability to do the right thing by
default.  But are you suggesting that the LLVM should also *not* expose the
ability to do this manually?  That would be strange.

No we agree here about default behaviour. What I'm saying is that having to
do things like calling getPointerToFunction() before explicitly calling the
cache invalidation method is what needs to be fixed. I don't really care
about the details of how this is done in the API as long as it's reasonably
clean.  

> I actually think that this model is great, for us.  We don't want to keep
the ExecutionEngine around after we have emitted code, and that code is
handed over to WebKit.  Our approach will work as follows ...
> I don't see a viable alternative to this approach no matter what LLVM's
API looked like: we don't want to pay the memory footprint of keeping around
LLVM data structures if we are not currently JITing code.

I there was a misunderstanding somewhere. Yes, ExecutionEngine lifetimes
should be independent of memory manager lifetimes, but to achieve this
requires more work than should be necessary. Personally I think the usage
pattern of having to "steal" the memory from LLVM just because of the mem
manager ownership is ugly. It's not a huge issue, but it would be nice if we
could just tweak the ownership model slightly. A few people now have had to
re-implement the same mechanisms you did because of it.
 
Amara









More information about the llvm-commits mailing list