<div dir="ltr">I thought I would add a data point.<div><br></div><div>I implemented the Orc v1 API in Clasp - an implementation of Common Lisp that uses llvm as the backend. </div><div>Recently, I switched over to using the new API - works great! I'm very excited about the work Lang has been doing and I'm excited to hear that there is a fix for lldb debugging of jitted code coming (thanks Stefan!).</div><div><br></div><div>Orc v1 API Clasp: (<a href="https://github.com/clasp-developers/clasp/tree/dev">https://github.com/clasp-developers/clasp/tree/dev</a>) </div><div>New Orc API Clasp: (<a href="https://github.com/clasp-developers/clasp/tree/dev-llvmtot">https://github.com/clasp-developers/clasp/tree/dev-llvmtot</a>)</div><div><br></div><div>It's a bit weird because Clasp is self-hosting and I expose the llvm API's to Common Lisp and I use the llvm API's in a combination of C++ code and Common Lisp code.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 17, 2019 at 3:35 PM Stefan Gränitz <<a href="mailto:stefan.graenitz@gmail.com">stefan.graenitz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
I agree, the deprecation of Orc v1 should come with more guidance
and preparation than currently available. I don't think you are
missing any channel. The main sources of information are code and
reviews. I gathered some data on typical lines of argumentation
below. Maybe it makes sense to have look at them in isolation.<br>
<br>
TL;DR: While I do have a number of proposals for the points in the
end, I would first like to hear your opinions.<br>
<br>
(1) MCJIT can be considered mature and stable, while Orc is
experimental:<br>
* Orc is in trunk for more than 4 years now [1]<br>
* tutorials moved to Orc with Release 3.8 (3 years ago) [2]<br>
* "ORC should be preferred for new projects" made it to the official
release notes only now, with 8.0<br>
* it's a common statement on the list since many years [3]<br>
<br>
(2) The LLVM test suite has various use-cases for lli, so the JIT
gets exercised well. Grepping through lit tests on master today
gives me:<br>
* 202 matches for lli in total (regex: RUN.*[% ]lli)<br>
* 80 matches for lli using Orc v1 (regex: RUN.*[%
]lli.*jit-kind=orc-mcjit)<br>
* 17 matches for lli using Orc v2 (regex: RUN.*[%
]lli.*jit-kind=orc-lazy)<br>
<br>
(3) There are few active stakeholders in LLVM JIT development:<br>
* ExecutionEngine saw about 250 commits in total during the last
year (looking at: llvm/include/llvm/ExecutionEngine &&
llvm/lib/ExecutionEngine)<br>
* 192 of these are from Lang, most of the remaining one's are either
not touching the JIT or NFC<br>
* I just submitted a fix for JITed code debugging in LLDB, which was
broken since Release 5.0 [4]<br>
<br>
Conclusions?<br>
* All newcomers go with Orc, because the tutorial uses it and the
list recommends it.<br>
* Some newcomers became clients. Their projects got
mature and they ask for a more stable API.<br>
* We saw drastic API changes in Orc with past releases. Upcoming
releases should account for the rate of adoption more and more.<br>
* Most clients stay clients. Certainly, there are many reasons for
that. Anyway, we need more active participation.<br>
<br>
It's time to:<br>
* Switch lli's default to Orc to increase visibility and test
coverage. Of course, MCJIT-specific tests should pass
-jit-kind=mcjit.<br>
* Agree on a way forward, at least for the current release, so we
can carve out small/simple tasks and distribute the work in the
community. If the removal of Orc v1 is part of the plan, we should
start convergence soon.<br>
* Communicate/discuss the current state (haves and wants) regularly
and transparently.<br>
* Get more people to participate actively.<br>
<br>
<br>
[1] <a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="https://github.com/llvm/llvm-project/commit/93de2a12" target="_blank">https://github.com/llvm/llvm-project/commit/93de2a12</a><br>
[2]
<a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="http://releases.llvm.org/3.8.0/docs/ReleaseNotes.html#non-comprehensive-list-of-changes-in-this-release" target="_blank">http://releases.llvm.org/3.8.0/docs/ReleaseNotes.html#non-comprehensive-list-of-changes-in-this-release</a><br>
[3] <a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2016-March/097767.html" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2016-March/097767.html</a><br>
[4] <a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="https://reviews.llvm.org/D61611" target="_blank">https://reviews.llvm.org/D61611</a><br>
<br>
<div class="gmail-m_3365745578504649023moz-cite-prefix">On 5/13/19 10:22 AM, Alex Denisov via
llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<pre class="gmail-m_3365745578504649023moz-quote-pre">Hi folks,
Rather by accident than on purpose I looked at the release notes and found the following:
<a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="http://releases.llvm.org/8.0.0/docs/ReleaseNotes.html#changes-to-the-jit-apis" target="_blank">http://releases.llvm.org/8.0.0/docs/ReleaseNotes.html#changes-to-the-jit-apis</a>
TL;DR: Orc v1 is deprecated and will be removed in the next release.
I have several questions in this regard:
1. Is there a migration guide I can use to update my code to the new version?
2. Is there any development plan for this part of LLVM? So far I have feeling that it's a closed source development.
3. Is there some communication channels I am missing to follow? I follow dev&commits mailing lists and present on IRC once in a while, but I somehow missed the message about the Orc v1 removal.
Also, the release notes mention that Orc v2 is the recommended way for the new projects, but:
1. Is there a documentation?
2. How stable the APIs are?
Thank you,
Alex.
</pre>
<br>
<fieldset class="gmail-m_3365745578504649023mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_3365745578504649023moz-quote-pre">_______________________________________________
LLVM Developers mailing list
<a class="gmail-m_3365745578504649023moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="gmail-m_3365745578504649023moz-signature" cols="72">--
<a class="gmail-m_3365745578504649023moz-txt-link-freetext" href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com" target="_blank">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="font-size:small">Christian Schafmeister</div><div style="font-size:small">Professor, Chemistry Department</div><div style="font-size:small">Temple University</div></div></div>