[PATCH][llvm-c] Expose MC JIT

Filip Pizlo fpizlo at apple.com
Tue Apr 23 17:56:19 PDT 2013


Updated patches.  I haven't changed the MCJIT C API patch since the last iteration.  Included is a second patch to add a unit test.  It's a very basic test - the goal is not to test any sophisticated functionality but to just confirm that it is indeed possible to use the MCJIT C API as we discussed (i.e. no additional calls needed to get permissions right).

I tried to factor the MCJITTestBase out a bit to share exactly the right things between C++ API tests and C API tests.  This involves creating yet another base class, which I call MCJITTestAPICommon - i.e. the things that are common between tests for two two APIs.  The C API tests do not list Darwin as unsupported, since they are testing functionality that works fine on Darwin.

-Filip




On Apr 22, 2013, at 5:37 PM, "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote:

> I’m not sure one way or the other if there are any C API tests.  Unless someone has a better suggestion, I’d say this could go in the ‘unittests/ExecutionEngine’ tree, perhaps parallel to the MCJIT tests that are there.
>  
> -Andy
>  
> From: Filip Pizlo [mailto:fpizlo at apple.com] 
> Sent: Monday, April 22, 2013 4:50 PM
> To: Kaylor, Andrew
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH][llvm-c] Expose MC JIT
>  
>  
> 
> On Apr 22, 2013, at 4:43 PM, "Kaylor, Andrew" <andrew.kaylor at intel.com> wrote:
> 
> Looks great!
>  
> Any chance you have tests for this?
>  
> Heh, good question. I tested it by running WebKit tests, but I can do better. Anything I should be mindful of when writing unit tests for the MCJIT?  And in particular the C API?  I couldn't immediately find we're C API tests lived. 
> 
> 
>  
> -Andy
>  
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Filip Pizlo
> Sent: Monday, April 22, 2013 2:09 PM
> To: llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH][llvm-c] Expose MC JIT
>  
> Here it is.  The C API no longer exposes finalizeObject() in any way, and makes sure to call it prior to doing anything that the user would expect to have already done permissions/invalidation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8024dac2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcjit_test.patch
Type: application/octet-stream
Size: 9243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8024dac2/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8024dac2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcjit.patch
Type: application/octet-stream
Size: 5543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8024dac2/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130423/8024dac2/attachment-0002.html>


More information about the llvm-commits mailing list