<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Lang,</p>
<p>Great idea on the status updates, I'll be sure to check them out.
Also thank you (and other contributors) for your work on ORC so
far, it has been a fun API to tinker with and a great entry point
into working with LLVM.</p>
<p>I'm for the most part just a lowly user of ORC but I try to
contribute here and there when I can. Mostly by nagging about COFF
support through bug reports ;-). <br>
</p>
<p>My use case for ORC is an expression-evaluator library I'm
working on called JitCat (<a class="moz-txt-link-abbreviated" href="http://www.jitcat.org">www.jitcat.org</a>). It has some built-in
reflection features to easily expose C++
functions/variables/classes for use in expressions. LLVM/ORC is
used for code generation. Future plans are to extend JitCat into a
fully featured scripting language. My own background is in game
development, which is also what I use JitCat for myself. <br>
</p>
<p>Regards,</p>
<p>Machiel van Hooren<br>
(jcmac on Discord)<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 17-Jan-20 03:00, Lang Hames via
llvm-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DF687800-F97F-4B7C-B87A-06EFECE3910B@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi All,
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>In the interests of improving visibility into
ORC JIT development I'm going to try writing
weekly status updates for the community. I hope
they will provide insight into the design and
state of development of LLVM's JIT APIs, as well
as serving as a convenient space for discussions
among LLVM's large and growing community of JIT
API users. The </div>
<div>length and detail will vary (depending on how
much work I've gotten through, and how long I can
dedicate to writing the update), but if people
find the updates valuable I will make an effort to
write at least something. Questions and comments
are most welcome (both on the format, and on the
content).</div>
<div><br>
</div>
<div>Since this is the first update, I have also
added some highlights from last year, and the plan
for 2020.</div>
<div><br>
</div>
<div><i>Highlights from 2019</i>:</div>
<div><br>
</div>
<div>(1) ORCv1 was officially deprecated in LLVM 9.
I have left it in for the LLVM 10 branch, but plan
to remove it from master in the coming weeks. All
development effort is now focused on ORCv2. If you
are an ORCv1 client, now's the time to switch
over. If you need help please ask on the llvm-dev
mailing lists (make sure you CC me) or #llvm on
discord. There are also some tips available in <a
href="https://llvm.org/docs/ORCv2.html"
moz-do-not-send="true">https://llvm.org/docs/ORCv2.html</a>
.</div>
<div><br>
</div>
<div>(2) LLVM has a new JIT linker, JITLink, which
is intended as an eventual replacement for
RuntimeDyld. The new design supports linker
plugins (allowing operation on the low-level bits
generated by the JIT linker) and native code
models (RuntimeDyld required a custom code model
on some platforms). Currently JITLink only
supports Darwin x86-64 and arm64, but I hope to
see support for new platforms added in the future.</div>
<div> </div>
<div>(3) Google Summer of Code student Praveen
Velliengiri demonstrated a basic <i>speculative
compilation</i> system built on ORCv2. This
system analyses code added to the JIT and triggers
early compilation on background threads for code
that is likely to be used at runtime. Using this
system Praveen was able to demonstrate significant
speedups on JIT execution of some SPEC benchmarks.
He presented this work at the 2019 LLVM
Developer's Meeting in San Jose (see <a
href="https://preejackie.github.io/GSoC-2019-LLVM"
moz-do-not-send="true">https://preejackie.github.io/GSoC-2019-LLVM</a>).</div>
<div><br>
</div>
<div><i>The plan for 2020</i>:</div>
<div><br>
</div>
<div>- Improve JIT support for static initializers:</div>
<div> - Add support for running initializers from
object files, which will enable loading and
caching of objects containing initializers.</div>
<div> - Improve support for platform-specific
initializer kinds like Objective-C +load methods.</div>
<div> - Switch from a push (“runConstructors”) to a
pull model (“getConstructorsToRun”) for
initializer execution. This will allow JIT’d code
to “dlopen” other JIT’d code and run the
initializers on the expected thread, which is
important for JIT’ing code that uses threads and
locks in initializers.</div>
<div><br>
</div>
<div>- Improve adherence to static/dynamic linker
rules: Weak symbol resolution across JITDylib
boundaries is still not handled correctly.</div>
<div><br>
</div>
<div>- Remove ORCv1.</div>
<div><br>
</div>
<div>- Bug fixes and documentation improvements.</div>
<div><br>
</div>
<div><i>Status report for this week</i>:<br>
</div>
<div><br>
</div>
<div>-- I’ve been working on a generic
implementation of the new initialization APIs
which I hope to be able to land next week. This
will replace the runConstructors/runDestructors
API in LLJIT (providing equivalent functionality:
initializers will be discovered by scanning
llvm.global_ctors/llvm.global_dtors), and will
enable the development of platform specific
initializer-support implementations.</div>
<div><br>
</div>
<div>-- There’s a long-ish chat with @drmeister on
the discord #llvm channel about RuntimeDyld vs
JITLink, and large vs small code model.</div>
<div><br>
</div>
<div>-- I have added a new LLJIT example program
that demonstrates how to use lazy-reexports in
ORCv2 to add lazy compilation:
llvm/examples/LLJITExamples/LLJITWithLazyReexports.<br>
</div>
<div><br>
</div>
<div>-- COFF support in the JIT still lags ELF and
MachO (See e.g. <a moz-do-not-send="true"
href="https://bugs.llvm.org/show_bug.cgi?id=40074">http://llvm.org/PR40074</a>).
If there are any COFF experts out there who are
interested in helping out with JIT bugs please let
me know!</div>
<div><br>
</div>
<div>Ok -- that’s enough from me for now. If you’re
a JIT user, developer, or just casual
JIT-development observer (dblaikie), and you have
questions, comments, or just feel like introducing
yourself: jump on in. :)</div>
<div><br>
</div>
<div>Lang.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</body>
</html>