<div dir="ltr">Hi Kevin,<div><br></div><div>My recommendation for people starting new projects is to use ORC rather than MCJIT where possible, as ORC has a strict superset of MCJIT's functionality. There are no guarantees on ORC API stability however, so if that's truly critical then MCJIT's C API would be a better fit for you.</div><div><br></div><div>If you're living on ToT (which we also generally recommend), then the minimal day-to-day churn on Orc should be manageable. If you're planning to live on stable releases you'll have the usual (and difficult-to-predict) inter-release headaches.</div><div><br></div><div>Either way, let me know how your choice works out for you: I'm keen to keep improving LLVM's JIT support.</div><div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 10:50 PM, Kevin Atkinson <span dir="ltr"><<a href="mailto:k@kevina.org" target="_blank">k@kevina.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
For a new language I am developing (in the very early stages, nothing public posted yet) I would like to able to use a JIT for several purposes:<br>
<br>
1) Create a functional REPL as is done is done with in the Kaleidoscope tutorial.<br>
<br>
2) Be able to interpret my language in addition to compiling.<br>
<br>
3) While compiling, be able to execute arbitrary code at compile time.  The simple case will be to get a value, similar to C++ constexpr but without any restrictions.  The complicated case will be to support a full macro system similar to syntax-rules in Racket or defmacro in Lisp.<br>
<br>
For (1) I would require being able to execute a function at a time. I would also like to be able to discard temporary functions used just to get a value.<br>
<br>
For (2) and (3) lazy compilation is required, catching the results would also be great.<br>
<br>
For right now I plan to use a direct AST based interpreter, but I would also like have JIT available when it is needed.<br>
<br>
It looks like the new ORC JIT will be better suited for my needs.  Would it be better to use the devel version of LLVM and the new JIT?  Or is the new ORC JIT too much of a moving target and would it be better to stick with MCJIT?<br>
<br>
If it is best to stick with MCJIT can someone point me to a working Kaleidoscope that will work with MCJIT and the latest released version of LLVM.  There are several versions floating around and I am confused on what version to use.  The examples in Kaleidoscope/MCJIT/lazy don't compile with 3.6.1 and I was hoping there was a version that would compile.<br>
<br>
Let me know if anything is unclear.<br>
<br>
Thanks in Advance,<br>
Kevin<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>