[LLVMdev] How to use MCJIT by default for a target
David.Tweed at arm.com
Tue Sep 18 08:21:55 PDT 2012
Hi, I'm looking into making MCJIT the default for the ARM-Linux-EABI target for lli.
(WHY? the old JIT doesn't really work on ARM, and in particular there are some regression tests of interesting things -- such as profiling -- that fail purely because the default old JIT doesn't work. So a consensus has been reached that the best way forward is to try to make the MCJIT the default for ARM-Linux-EABI and see if that's workable.)
Looking at the lli source code, there's the option UseMCJIT that defaults to false. You can also use -use-mcjit, -use-mcjit=true, -use-mcjit=false. Things would be fine if we could make the option default architecture dependent. However, these defaults are all set-up BEFORE we commit to what architectural triple we're using (as the target triple can be specified via argument). If we try to mess with the option based on the triple after it's gone through parsing rather than the default, we can't distinguish between "false (from default)" and "false (set deliberately)". All this does assume, of course, that it's important to provide a way for the user to stop lli using the MCJIT; I think that's probably wise but maybe it's unnecessary.
Anyway, this sounds like making a default choice based on a target-triple is something that probably ought to be done "using canonical idiom" so it's easily grokked rather than using an ad-hoc approach. Does anyone have any thoughts?
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the llvm-dev