Hi all, I have just updated most of the patches to roll them forwards to LLVM top-of-tree, and incorporated various suggested changes. We're still looking for reviewers, if anyone is interested. Thank you, Edward Jones On 15/09/16 17:12, Ed Jones wrote:> I have now posted the final two patches for the backend to add > Disassembler support, ISel and CodeGen. The full list of patches is now: > > https://reviews.llvm.org/D23664 - AAP triple and target > https://reviews.llvm.org/D23665 - ELF definitions > https://reviews.llvm.org/D23667 - Stub backend > https://reviews.llvm.org/D23770 - InstrInfo, RegInfo Tablegen > https://reviews.llvm.org/D23771 - MC layer support > https://reviews.llvm.org/D23772 - AsmParser > https://reviews.llvm.org/D23773 - InstPrinter > https://reviews.llvm.org/D24612 - Disassembler support > https://reviews.llvm.org/D24613 - Code generation > > Currently only the first patch has been accepted, and we are looking for > more people to review the remaining patches. > > Thank you, > Ed Jones > > On 18/08/16 08:34, Ed Jones wrote: >> Hi all, >> >> We wish to submit our latest AAP implementation as an experimental >> backend into LLVM. We need community feedback and reviewers for patches >> which we will submit soon. >> >> AAP was designed in early 2015 and aims to advance compiler development >> for small deeply embedded Harvard architectures, which are widely used >> commercially. AAP is freely available as an open source softcore for use >> in FPGA designs. >> >> AAP has wide exposure: at ORCONF16 at CERN, at FOSDEM and at BCS and >> OSHUG meetings. It is also of commercial interest, because of the >> potential benefits of providing upstream LLVM support for features found >> in small embedded processors. >> >> Currently there is a complete Clang and LLVM toolchain including gdb, ld >> and binutils, as well as two simulator implementations. The toolchain is >> passing all LLVM regression tests and a decent proportion of GCC >> regression tests. We are also working on a GCC port to allow comparison >> between compilers, which should be beneficial to both projects. >> >> We believe the code base is sufficiently mature that it is appropriate >> for inclusion. Currently, the full source for AAP can be found on Github: >> https://github.com/embecosm >> >> Details about the ISA, and the hardware implementation can be found on >> our website: >> http://www.embecosm.com/resources/appnotes/#EAN13 >> http://www.embecosm.com/resources/appnotes/#EAN14 >> >> We are also planning to talk about AAP at the LLVM Cauldron in Hebden >> Bridge. We look forward to discussing our work on AAP with those who are >> attending. >> >> Thank you, >> Ed Jones >>
I just wanted to say, regardless of whether this backend ultimately gets committed, this sequence of patches is some of the best practical documentation we have for how to get started writing an LLVM backend[*]. The patch series is very nicely broken down, and the architecture is simple enough that the purpose of most constructs (e.g. in TableGen files) and boilerplate can be inferred at a glance. Bravo. As far as whether we should accept the backend, we have XCore, MSP430, and AVR which cover a decent spectrum of embedded use cases. If the goal is to simply serve as an example of an embedded target, maybe one of the existing backends could be improved (or sacrificed? XCore and MSP430 have been hanging around for.... a long time with very little activity). The idea of a "stub" backend that would simply serve as a starting point for new backends has been around for a long time. AAP might be simple enough that it could serve that role? Anton, what do you think? [*] it is a good complement to http://jonathan2251.github.io/lbd/ (backend tutorial) and https://jonathan2251.github.io/lbt/ (its cousin covering the rest of the toolchain, like compiler-rt and LLD) -- Sean Silva On Wed, Nov 16, 2016 at 8:36 AM, Ed Jones via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi all, > > I have just updated most of the patches to roll them forwards to LLVM > top-of-tree, and incorporated various suggested changes. We're still > looking for reviewers, if anyone is interested. > > Thank you, > Edward Jones > > On 15/09/16 17:12, Ed Jones wrote: > > I have now posted the final two patches for the backend to add > > Disassembler support, ISel and CodeGen. The full list of patches is now: > > > > https://reviews.llvm.org/D23664 - AAP triple and target > > https://reviews.llvm.org/D23665 - ELF definitions > > https://reviews.llvm.org/D23667 - Stub backend > > https://reviews.llvm.org/D23770 - InstrInfo, RegInfo Tablegen > > https://reviews.llvm.org/D23771 - MC layer support > > https://reviews.llvm.org/D23772 - AsmParser > > https://reviews.llvm.org/D23773 - InstPrinter > > https://reviews.llvm.org/D24612 - Disassembler support > > https://reviews.llvm.org/D24613 - Code generation > > > > Currently only the first patch has been accepted, and we are looking for > > more people to review the remaining patches. > > > > Thank you, > > Ed Jones > > > > On 18/08/16 08:34, Ed Jones wrote: > >> Hi all, > >> > >> We wish to submit our latest AAP implementation as an experimental > >> backend into LLVM. We need community feedback and reviewers for patches > >> which we will submit soon. > >> > >> AAP was designed in early 2015 and aims to advance compiler development > >> for small deeply embedded Harvard architectures, which are widely used > >> commercially. AAP is freely available as an open source softcore for use > >> in FPGA designs. > >> > >> AAP has wide exposure: at ORCONF16 at CERN, at FOSDEM and at BCS and > >> OSHUG meetings. It is also of commercial interest, because of the > >> potential benefits of providing upstream LLVM support for features found > >> in small embedded processors. > >> > >> Currently there is a complete Clang and LLVM toolchain including gdb, ld > >> and binutils, as well as two simulator implementations. The toolchain is > >> passing all LLVM regression tests and a decent proportion of GCC > >> regression tests. We are also working on a GCC port to allow comparison > >> between compilers, which should be beneficial to both projects. > >> > >> We believe the code base is sufficiently mature that it is appropriate > >> for inclusion. Currently, the full source for AAP can be found on > Github: > >> https://github.com/embecosm > >> > >> Details about the ISA, and the hardware implementation can be found on > >> our website: > >> http://www.embecosm.com/resources/appnotes/#EAN13 > >> http://www.embecosm.com/resources/appnotes/#EAN14 > >> > >> We are also planning to talk about AAP at the LLVM Cauldron in Hebden > >> Bridge. We look forward to discussing our work on AAP with those who are > >> attending. > >> > >> Thank you, > >> Ed Jones > >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://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/20161122/4c0d3565/attachment.html>
Thank you Sean. I can't really take credit for the layout of the patches as I mainly followed the layout Alex Bradbury used when he was submitting the RISC-V backend. The goal is less to serve as an example project, and more to serve as a platform to implement support for interesting hardware features that we see in out-of-tree backends. Whilst we could work on some of the in-tree embedded targets, we would still be limited by the underlying hardware, and we would like to be able to easily add new features as needed. The initial AAP backend is pretty simple, but it will change and become more complex over time so it may not serve a good role as an example backend. Thanks, Ed On 23/11/16 07:17, Sean Silva wrote:> I just wanted to say, regardless of whether this backend ultimately gets > committed, this sequence of patches is some of the best practical > documentation we have for how to get started writing an LLVM backend[*]. > The patch series is very nicely broken down, and the architecture is simple > enough that the purpose of most constructs (e.g. in TableGen files) and > boilerplate can be inferred at a glance. Bravo. > > > As far as whether we should accept the backend, we have XCore, MSP430, and > AVR which cover a decent spectrum of embedded use cases. If the goal is to > simply serve as an example of an embedded target, maybe one of the existing > backends could be improved (or sacrificed? XCore and MSP430 have been > hanging around for.... a long time with very little activity). > > The idea of a "stub" backend that would simply serve as a starting point > for new backends has been around for a long time. AAP might be simple > enough that it could serve that role? Anton, what do you think? > > > [*] it is a good complement to http://jonathan2251.github.io/lbd/ (backend > tutorial) and https://jonathan2251.github.io/lbt/ (its cousin covering the > rest of the toolchain, like compiler-rt and LLD) > > -- Sean Silva > > On Wed, Nov 16, 2016 at 8:36 AM, Ed Jones via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi all, >> >> I have just updated most of the patches to roll them forwards to LLVM >> top-of-tree, and incorporated various suggested changes. We're still >> looking for reviewers, if anyone is interested. >> >> Thank you, >> Edward Jones >> >> On 15/09/16 17:12, Ed Jones wrote: >>> I have now posted the final two patches for the backend to add >>> Disassembler support, ISel and CodeGen. The full list of patches is now: >>> >>> https://reviews.llvm.org/D23664 - AAP triple and target >>> https://reviews.llvm.org/D23665 - ELF definitions >>> https://reviews.llvm.org/D23667 - Stub backend >>> https://reviews.llvm.org/D23770 - InstrInfo, RegInfo Tablegen >>> https://reviews.llvm.org/D23771 - MC layer support >>> https://reviews.llvm.org/D23772 - AsmParser >>> https://reviews.llvm.org/D23773 - InstPrinter >>> https://reviews.llvm.org/D24612 - Disassembler support >>> https://reviews.llvm.org/D24613 - Code generation >>> >>> Currently only the first patch has been accepted, and we are looking for >>> more people to review the remaining patches. >>> >>> Thank you, >>> Ed Jones >>> >>> On 18/08/16 08:34, Ed Jones wrote: >>>> Hi all, >>>> >>>> We wish to submit our latest AAP implementation as an experimental >>>> backend into LLVM. We need community feedback and reviewers for patches >>>> which we will submit soon. >>>> >>>> AAP was designed in early 2015 and aims to advance compiler development >>>> for small deeply embedded Harvard architectures, which are widely used >>>> commercially. AAP is freely available as an open source softcore for use >>>> in FPGA designs. >>>> >>>> AAP has wide exposure: at ORCONF16 at CERN, at FOSDEM and at BCS and >>>> OSHUG meetings. It is also of commercial interest, because of the >>>> potential benefits of providing upstream LLVM support for features found >>>> in small embedded processors. >>>> >>>> Currently there is a complete Clang and LLVM toolchain including gdb, ld >>>> and binutils, as well as two simulator implementations. The toolchain is >>>> passing all LLVM regression tests and a decent proportion of GCC >>>> regression tests. We are also working on a GCC port to allow comparison >>>> between compilers, which should be beneficial to both projects. >>>> >>>> We believe the code base is sufficiently mature that it is appropriate >>>> for inclusion. Currently, the full source for AAP can be found on >> Github: >>>> https://github.com/embecosm >>>> >>>> Details about the ISA, and the hardware implementation can be found on >>>> our website: >>>> http://www.embecosm.com/resources/appnotes/#EAN13 >>>> http://www.embecosm.com/resources/appnotes/#EAN14 >>>> >>>> We are also planning to talk about AAP at the LLVM Cauldron in Hebden >>>> Bridge. We look forward to discussing our work on AAP with those who are >>>> attending. >>>> >>>> Thank you, >>>> Ed Jones >>>> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >