<div dir="ltr">That's great. Our patch wouldn't be ready earlier than 2-3 weeks from now. In the next few days we will spend some time reviewing your patch and will let you know if we have any comments.<div><br></div><div>Thanks</div><div>Ehsan</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 29, 2020 at 4:23 AM Sjoerd Meijer <<a href="mailto:Sjoerd.Meijer@arm.com">Sjoerd.Meijer@arm.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 dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Ehsan,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Evgeny uploaded our version here: <a href="https://reviews.llvm.org/D88307" id="gmail-m_4942072938419800620LPlnk243826" target="_blank">
https://reviews.llvm.org/D88307</a>. He wants to address a few issues.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
But yeah, if you've got one ready too, perhaps best to upload it if that's what you want to do. I guess that makes it easier to look at both and see which one would have our preference?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Cheers,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Sjoerd.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_4942072938419800620appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_4942072938419800620divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Ehsan Amiri <<a href="mailto:ehsanamiri@gmail.com" target="_blank">ehsanamiri@gmail.com</a>><br>
<b>Sent:</b> 29 September 2020 02:37<br>
<b>To:</b> Sjoerd Meijer <<a href="mailto:Sjoerd.Meijer@arm.com" target="_blank">Sjoerd.Meijer@arm.com</a>><br>
<b>Cc:</b> Phipps, Alan <<a href="mailto:a-phipps@ti.com" target="_blank">a-phipps@ti.com</a>>; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>; Eli Friedman <<a href="mailto:efriedma@quicinc.com" target="_blank">efriedma@quicinc.com</a>>; Evgeny Astigeevich <<a href="mailto:Evgeny.Astigeevich@arm.com" target="_blank">Evgeny.Astigeevich@arm.com</a>>; David Green <<a href="mailto:David.Green@arm.com" target="_blank">David.Green@arm.com</a>><br>
<b>Subject:</b> Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Sjoerd
<div><br>
</div>
<div>We (at Huawei) also have a pass for this. Originally we implemented this back in 2018 and meant to upstream it, but there were some issues with the implementation that required some changes in the code. We started revising it,a few weeks ago.</div>
<div><br>
</div>
<div>I thought now that there are multiple options, maybe we can discuss our approaches, and see if there is a preference in the community for one approach over the other ? What do you think?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Ehsan</div>
<div><br>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Sep 23, 2020 at 3:14 PM Sjoerd Meijer via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
And related while we are at it, i.e. the coremark specials, we have this sitting in upstream review: <a href="https://reviews.llvm.org/D42365" id="gmail-m_4942072938419800620x_gmail-m_8290354130081295924LPlnk359956" target="_blank">https://reviews.llvm.org/D42365</a> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
That should help a bit too. It needs a little bit of work, but I thought Dave didn't mind if someone commandeers and finishes it.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_4942072938419800620x_gmail-m_8290354130081295924appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_4942072938419800620x_gmail-m_8290354130081295924divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>>
on behalf of Sjoerd Meijer via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Sent:</b> 23 September 2020 20:03<br>
<b>To:</b> Phipps, Alan <<a href="mailto:a-phipps@ti.com" target="_blank">a-phipps@ti.com</a>>;
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>; Eli Friedman <<a href="mailto:efriedma@quicinc.com" target="_blank">efriedma@quicinc.com</a>>;
Evgeny Astigeevich <<a href="mailto:Evgeny.Astigeevich@arm.com" target="_blank">Evgeny.Astigeevich@arm.com</a>><br>
<b>Subject:</b> Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
+ Evgeny</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
We have a jump threading pass downstream for this that we would love to upstream. I believe Evgeny was working on exactly this, i.e. preparing it for upstreaming.<br>
</div>
<div id="gmail-m_4942072938419800620x_gmail-m_8290354130081295924x_appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_4942072938419800620x_gmail-m_8290354130081295924x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>>
on behalf of Eli Friedman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Sent:</b> 23 September 2020 19:16<br>
<b>To:</b> Phipps, Alan <<a href="mailto:a-phipps@ti.com" target="_blank">a-phipps@ti.com</a>>;
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata</font>
<div> </div>
</div>
<div lang="EN-US">
<div>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Nobody is currently working on this, as far as I know. If you’re interested in looking into it, I’ll try to answer any questions.</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">-Eli</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>>
<b>On Behalf Of </b>Phipps, Alan via llvm-dev<br>
<b>Sent:</b> Wednesday, September 23, 2020 7:34 AM<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> [EXT] [llvm-dev] Improved jump-threading in LLVM for finite state automata</p>
</div>
</div>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">It is my understanding that the implementation for jump-threading in LLVM is not presently able to effectively optimize code containing a state-machine implemented using a loop + switch.
This is the case, for example, with the Coremark benchmark function core_state_transition(). Bug 42313 was filed to address this in 2019:</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://bugs.llvm.org/show_bug.cgi?id=42313" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=42313</a></p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">It appears that GCC improved support for jump threading in 2015 along the same lines:</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742</a></p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Is anyone aware of any plan to do improve LLVM jump-threading along the same lines for LLVM?</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Thanks!</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Alan Phipps</p>
<p style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>
</div>
</div>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
</div>
</div>
</blockquote></div>