[llvm-commits] [PATCH] Add basic ELF Dyld loader (on behalf of Andy Kaylor)

Malea, Daniel daniel.malea at intel.com
Mon Dec 19 12:16:04 PST 2011


Hi all,

Thanks everyone for your input; here's an updated patch with passing tests! In addition to running the existing ExecutionEngine tests against MCJIT, we added a few new test cases. To run them against the MCJIT implementation, invoke lit with the "--param jit_impl=mcjit" option, which then causes lli to be invoked with "-use-mcjit".

Compared to the last iteration of the patch, here’s exactly what has changed:
-	Removed "default:" case in switch statement as per Rafael’s suggestion
-	Moved RuntimeDyldMachO::isKnownFormat() into isCompatibleFormat() of the same class
-	Added 6 new test cases in test/ExecutionEngine
-	Added “XFAIL: mcjit” to tests we expect not to pass 
-	Updated lit.cfg and existing ExecutionEngine tests to handle the jit_impl parameter
-	Updated lli to use the default memory manager (to enable MCJIT to even run)
-	Removed Objective-C specific name handling behavior from the MCJIT memory manager

Regarding the last point, I'm not really confident that just removing the objective-c specific behavior is correct, but it seems like language specific things should probably not go in something called "MCJITMemoryManager". Perhaps Jim Grosbach can comment as he is on the commit logs for the code being touched. Maybe we should rename the existing implementation to something like ObjCMCJITMemoryManager?

Regarding the tests, the code isn't quite robust enough to enable all the existing ExecutionEngine tests to pass due to known issues with external function calls and globals; but nonetheless the following existing tests do pass, at least on (Ubuntu) Linux ia64:

(existing tests)
test/ExecutionEngine/2003-01-04-PhiTest.ll
test/ExecutionEngine/2003-01-09-SARTest.ll
test/ExecutionEngine/2003-01-10-FUCOM.ll
test/ExecutionEngine/2003-01-15-AlignmentTest.ll
test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
test/ExecutionEngine/2003-06-04-bip2-bug.ll
test/ExecutionEngine/2003-06-05-PHIBug.ll
test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
test/ExecutionEngine/2005-12-02-TailCallBug.ll
test/ExecutionEngine/simplesttest.ll
test/ExecutionEngine/simpletest.ll
test/ExecutionEngine/test-arith.ll
test/ExecutionEngine/test-branch.ll
test/ExecutionEngine/test-cast.ll
test/ExecutionEngine/test-constantexpr.ll
test/ExecutionEngine/test-loadstore.ll
test/ExecutionEngine/test-logical.ll
test/ExecutionEngine/test-loop.ll
test/ExecutionEngine/test-phi.ll
test/ExecutionEngine/test-ret.ll
test/ExecutionEngine/test-setcond-fp.ll
test/ExecutionEngine/test-setcond-int.ll
test/ExecutionEngine/test-shift.ll
test/ExecutionEngine/test-setcond-fp.ll

(new tests)
test/ExecutionEngine/test-call-no-external-funcs.ll
test/ExecutionEngine/test-local.ll
test/ExecutionEngine/test-return.ll

Thanks,
Dan

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Rafael Ávila de Espíndola
Sent: Saturday, December 17, 2011 12:32 PM
To: Kaylor, Andrew
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Add basic ELF Dyld loader (on behalf of Andy Kaylor)

On 14/12/11 04:28 PM, Kaylor, Andrew wrote:
> Hi Rafael,
> 
> I'll remove the 'default' (per Eric's preference).
> 
> This will run a basic program.  I believe this version can even call 
> functions JITted in the same module.  We have a couple of
> lit+lli-based tests, which I believe will be submitted soon.

Cool, can you send an updated patch? If you can include at least one basic test in the patch, that would be perfect.

> Thanks, Andy
> 

Thanks,
Rafael
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-basic-runtimedyld-elf-loader_v3.patch
Type: application/octet-stream
Size: 40291 bytes
Desc: 0001-basic-runtimedyld-elf-loader_v3.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111219/9e418630/attachment.obj>


More information about the llvm-commits mailing list