Sjoerd Meijer via llvm-dev
2020-Sep-23 19:03 UTC
[llvm-dev] Improved jump-threading in LLVM for finite state automata
+ Evgeny 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. ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Eli Friedman via llvm-dev <llvm-dev at lists.llvm.org> Sent: 23 September 2020 19:16 To: Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata 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. -Eli From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Phipps, Alan via llvm-dev Sent: Wednesday, September 23, 2020 7:34 AM To: llvm-dev at lists.llvm.org Subject: [EXT] [llvm-dev] Improved jump-threading in LLVM for finite state automata 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: https://bugs.llvm.org/show_bug.cgi?id=42313 It appears that GCC improved support for jump threading in 2015 along the same lines: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742 Is anyone aware of any plan to do improve LLVM jump-threading along the same lines for LLVM? Thanks! Alan Phipps -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200923/9bc8b75c/attachment.html>
Sjoerd Meijer via llvm-dev
2020-Sep-23 19:13 UTC
[llvm-dev] Improved jump-threading in LLVM for finite state automata
And related while we are at it, i.e. the coremark specials, we have this sitting in upstream review: https://reviews.llvm.org/D42365 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. ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Sjoerd Meijer via llvm-dev <llvm-dev at lists.llvm.org> Sent: 23 September 2020 20:03 To: Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>; Eli Friedman <efriedma at quicinc.com>; Evgeny Astigeevich <Evgeny.Astigeevich at arm.com> Subject: Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata + Evgeny 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. ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Eli Friedman via llvm-dev <llvm-dev at lists.llvm.org> Sent: 23 September 2020 19:16 To: Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata 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. -Eli From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Phipps, Alan via llvm-dev Sent: Wednesday, September 23, 2020 7:34 AM To: llvm-dev at lists.llvm.org Subject: [EXT] [llvm-dev] Improved jump-threading in LLVM for finite state automata 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: https://bugs.llvm.org/show_bug.cgi?id=42313 It appears that GCC improved support for jump threading in 2015 along the same lines: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742 Is anyone aware of any plan to do improve LLVM jump-threading along the same lines for LLVM? Thanks! Alan Phipps -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200923/6bbaac5c/attachment.html>
Phipps, Alan via llvm-dev
2020-Sep-24 20:43 UTC
[llvm-dev] [EXTERNAL] Re: Improved jump-threading in LLVM for finite state automata
This is great to hear, thanks for the update! Can you provide a timeline for when you expect to have the jump-threading update in review? The loop-flattening pass also looks very useful. I'm sure we could help with the review -- I don't know about taking ownership of it, at least right now. -Alan From: Sjoerd Meijer [mailto:Sjoerd.Meijer at arm.com] Sent: Wednesday, September 23, 2020 2:14 PM To: Phipps, Alan; llvm-dev at lists.llvm.org; Eli Friedman; Evgeny Astigeevich; Sjoerd Meijer; David Green Subject: [EXTERNAL] Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata And related while we are at it, i.e. the coremark specials, we have this sitting in upstream review: https://reviews.llvm.org/D42365 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. ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Sjoerd Meijer via llvm-dev <llvm-dev at lists.llvm.org> Sent: 23 September 2020 20:03 To: Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>; Eli Friedman <efriedma at quicinc.com>; Evgeny Astigeevich <Evgeny.Astigeevich at arm.com> Subject: Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata + Evgeny 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. ________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Eli Friedman via llvm-dev <llvm-dev at lists.llvm.org> Sent: 23 September 2020 19:16 To: Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Improved jump-threading in LLVM for finite state automata 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. -Eli From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Phipps, Alan via llvm-dev Sent: Wednesday, September 23, 2020 7:34 AM To: llvm-dev at lists.llvm.org Subject: [EXT] [llvm-dev] Improved jump-threading in LLVM for finite state automata 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: https://bugs.llvm.org/show_bug.cgi?id=42313 It appears that GCC improved support for jump threading in 2015 along the same lines: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742 Is anyone aware of any plan to do improve LLVM jump-threading along the same lines for LLVM? Thanks! Alan Phipps -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200924/df4b0575/attachment.html>
Ehsan Amiri via llvm-dev
2020-Sep-29 01:37 UTC
[llvm-dev] Improved jump-threading in LLVM for finite state automata
Hi Sjoerd 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. 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? Thanks Ehsan On Wed, Sep 23, 2020 at 3:14 PM Sjoerd Meijer via llvm-dev < llvm-dev at lists.llvm.org> wrote:> And related while we are at it, i.e. the coremark specials, we have this > sitting in upstream review: https://reviews.llvm.org/D42365 > 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. > > > ------------------------------ > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Sjoerd > Meijer via llvm-dev <llvm-dev at lists.llvm.org> > *Sent:* 23 September 2020 20:03 > *To:* Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org < > llvm-dev at lists.llvm.org>; Eli Friedman <efriedma at quicinc.com>; Evgeny > Astigeevich <Evgeny.Astigeevich at arm.com> > *Subject:* Re: [llvm-dev] Improved jump-threading in LLVM for finite > state automata > > + Evgeny > > 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. > > ------------------------------ > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Eli > Friedman via llvm-dev <llvm-dev at lists.llvm.org> > *Sent:* 23 September 2020 19:16 > *To:* Phipps, Alan <a-phipps at ti.com>; llvm-dev at lists.llvm.org < > llvm-dev at lists.llvm.org> > *Subject:* Re: [llvm-dev] Improved jump-threading in LLVM for finite > state automata > > > 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. > > > > -Eli > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Phipps, > Alan via llvm-dev > *Sent:* Wednesday, September 23, 2020 7:34 AM > *To:* llvm-dev at lists.llvm.org > *Subject:* [EXT] [llvm-dev] Improved jump-threading in LLVM for finite > state automata > > > > 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: > > > > https://bugs.llvm.org/show_bug.cgi?id=42313 > > > > It appears that GCC improved support for jump threading in 2015 along the > same lines: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742 > > > > Is anyone aware of any plan to do improve LLVM jump-threading along the > same lines for LLVM? > > > > Thanks! > > > > Alan Phipps > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200928/4adc51c5/attachment.html>