<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Courier New, Courier, monospace">Hi all,<br>
</font></p>
<p><font face="Courier New, Courier, monospace">I have come up with
some idea for the speculation task:<br>
</font></p>
<p><font face="Courier New, Courier, monospace">1) Construct the
local(per-module) function ordering list based on the sequence
of their call in control flow graphs and create stub for each
symbol from other module that is referenced by the current
function, put the module in waiting list.<br>
</font></p>
<p><font face="Courier New, Courier, monospace">2) Replace the stub
with actual native code address and notify the modules in the
waiting list.</font></p>
<p><font face="Courier New, Courier, monospace">The creation of
function ordering list involves analysing the control flow
graphs and branch probability for conditional function calls.
I'm also trying to figure out whether the function atttributes
will fit in this picture + more like using module summaries from
thinlto builds. <br>
</font></p>
<p><font face="Courier New, Courier, monospace">These speculation
actions should be buried into internals of concurrent compiler
and should not be visible to clients right? <br>
</font></p>
<p><font face="Courier New, Courier, monospace">How I can proceed
with plan, I'm open to comments!</font></p>
<p><font face="Courier New, Courier, monospace">Anyone interested in
mentoring this project for GSoC 2019. Please reply!<br>
</font></p>
<div class="moz-cite-prefix">On 14/03/19 4:10 AM, preejackie wrote:<br>
</div>
<blockquote type="cite"
cite="mid:47cd973d-7824-72dd-f1a2-aeb1f83c745d@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p><font face="FreeSans">Dear All, <br>
</font></p>
<p><font face="FreeSans">The new concurrent orc jit support
speculative compilation with a naive implementation and
laziness. Compiling everything up-front can consume more CPU
and memory than needed and also impose significant effect on
resource constraint systems due to context switching of JIT
threads (coarse level parallelism). The main idea here is to
develop heuristics to find which functions are worth compiling
into executable bits, speculatively using jit threads. <br>
</font></p>
<p><font face="FreeSans">Heuristics can be extracted by analyzing
higher level program representations such as ASTs, CFGs and
from LLVM IR. Profile guided optimization can also used to
determine heuristics with greater confidence level based on
previous execution steps.</font></p>
<p><font face="FreeSans">Goals: <br>
</font></p>
<p><font face="FreeSans">1) Create & Improve APIs to support
heuristic guided speculative compilation in concurrent orc
jit.</font></p>
<p><font face="FreeSans">2) Finding key heuristics to decide what
to compile next.</font></p>
<p><font face="FreeSans">3) Bench marking jit with eagerly
speculating full module vs heuristic based approach for
different jit threads.</font></p>
<p><font face="FreeSans">Possible caveats:</font></p>
<p><font face="FreeSans">1) More time spent in analyzing what to
compile next than actually compiling. These can addressed once
we have basic working prototype, so that we can find out the
bottlenecks and remove it. Or may be parallelizing analysis
process.</font></p>
<p><font face="FreeSans"><br>
</font></p>
<p><font face="FreeSans">Currently, I'm trying to find heuristics
that can be used for this project and familiarizing with
concurrent jit design and APIs. <font face="FreeSans">Also,
please note that this idea has been proposed by Lang Hames
and I</font> would like to propose this idea &
implementation for GSoC 2019 :) and I'm improvising this idea.
I would like to know the community responses! <br>
</font></p>
<p><font face="FreeSans">This can serve as a good documentation
for me to write a proposal and to keep things in track. <br>
</font></p>
<p><font face="FreeSans">Any thoughts on finding useful heuristics
are highly appreciated :) I have also started a thread in
Numba JIT project to see what heuristics they are using.</font></p>
<p><font face="FreeSans">Also anyone interested in mentoring this
project please reply! <br>
</font></p>
<p>References:</p>
<p><a href="https://www.youtube.com/watch?v=hILdR8XRvdQ"
moz-do-not-send="true">LLVM Next Gen JIT API</a></p>
<p><a href="https://www.youtube.com/watch?v=MOQG5vkh9J8"
moz-do-not-send="true">Updating Orc for concurrency</a></p>
<p><a href="https://www.youtube.com/watch?v=ZCnHxRhQmvs"
moz-do-not-send="true">Thinlto summaries in JIT</a><br>
</p>
<pre class="moz-signature" cols="72">Have a great day!
PreeJackie</pre>
<pre class="moz-signature" cols="72">--
Have a great day!
PreeJackie</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Have a great day!
PreeJackie</pre>
</body>
</html>