<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Very welcome news! :))<div class=""><br class=""></div><div class="">I use an experimental back end on LLVM at the moment for AVR chips but it has never had Atmel/Microchip official support or assistance so it’s not as good as it could be.</div><div class=""><br class=""></div><div class="">With Tensilica giving official backing to your LLVM back end you will make already very attractive chips even more amazing. You guys are killing it! :))</div><div class=""><br class=""></div><div class="">FYI, I’m targeting AVR compiled from the Swift language front end, building a standard library, etc. aimed at low power, simple microcontrollers. ESP32/ESP8266 would be a very natural fit for our community. I have already had many customers ask if it’s possible.  Until now I had to tell them there was not yet a supported back end. This is great news!</div><div class=""><br class=""></div><div class="">Carl<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 7 Mar 2019, at 17:47, Andrei Safronov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class=""><p class="">Hello, James,<br class="">
      <br class="">
      Thank you very much for your advices! The next step in compiler
      development on Espressif is object file generation. There are no
      essential problems with this step, it will be implemented in
      nearest future. Currently Xtensa backend is able to print and
      parse assembly, I used about 1300 tests from gcc torture testsuite
      and GNU binutils to debug assembly output and now all tests could
      be compiled and executed successfully. So, with object file
      generation Xtensa backend will be significally closer to be used
      in real projects, but I'm agree that it is not ready yet for
      upstreaming. There is no llvm tests and also it is hard to review
      such big amount of code. So I need to do something with these
      issues.<br class="">
      <br class="">
      I reviewed integration process of  the RISC-V backend, which you
      mentioned. Did I understand correctly that you suggest to split
      the proposed Xtensa backend into ordered patches, each of which
      defines some backend functionality (starting from Asm/MC
      layer)that is easy to review? And also include in each patch some
      set of tests to verify such functionality?</p><p class="">Best regards, <br class="">
      Andrei Safronov<br class="">
    </p>
    <div class="moz-cite-prefix">07.03.2019 1:31, James Y Knight пишет:<br class="">
    </div>
    <blockquote type="cite" cite="mid:CAA2zVHpUtO8phiU2RpH2id4TEN-Vj5Yfj5Q-4raUVMD=WbGLNA@mail.gmail.com" class="">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
      <div dir="ltr" class="">
        <div dir="ltr" class="">
          <div dir="ltr" class="">Sounds like a good idea to me! It seems there's
            plenty of interest in this architecture.
            <div class=""><br class="">
            </div>
            <div class="">From a quick glance at your existing code, it looks
              like you haven't added any llvm tests -- that'll certainly
              be a requirement.  But barring some particular reason why
              it's not feasible, I think that having object-file
              generation working is basically considered a requirement
              for new architectures. (It's also not clear to me why you
              cannot with your current code, it looks like instruction
              definitions already have their encodings specified and
              such).</div>
            <div class=""><br class="">
            </div>
            <div class="">If you haven't yet, you ought to check out at the great
              patch series that Alex Bradbury created to demonstrate the
              addition of RISCV support to LLVM, as a guide to what
              order it probably makes sense to make the changes, and how
              to split the changes into reviewable pieces for
              upstreaming: <a href="https://github.com/lowRISC/riscv-llvm" target="_blank" moz-do-not-send="true" class="">https://github.com/lowRISC/riscv-llvm</a></div>
            <div class=""><br class="">
            </div>
            <div class="">
              <div class="">I'd suggest as your first step, you should work on
                getting just the Asm/MC layer rebased onto trunk and
                working for the core ISA for your target -- able to
                parse and print assembly, both textual and object files
                -- with a full suite of test-cases at each step. Just
                like the first ~10 patches in the above patchset.</div>
              <br class="gmail-Apple-interchange-newline">
            </div>
            <div class=""><br class="">
            </div>
          </div>
        </div>
      </div>
      <br class="">
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Mar 6, 2019 at 6:29 AM
          Andrei Safronov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" moz-do-not-send="true" class="">llvm-dev@lists.llvm.org</a>>
          wrote:<br class="">
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF" class=""><div class=""> <br class="webkit-block-placeholder"></div>
            <div class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-text-flowed" style="font-family:-moz-fixed;font-size:14px" lang="x-unicode">Hello, <br class="">
              <br class="">
              I'm from Espressif Systems company, software department.
              Our company develops processors based on Xtensa
              architecture like ESP32 and ESP8266. We propose the
              integration of a backend targeting Xtensa architecture. <br class="">
              <br class="">
              We started to develop LLVM Xtensa backend almost a year
              ago. The reason was that we saw a demand from our large
              developers community. Currently only GNU compiler supports
              Xtensa architecture. The company has approved me to
              develop and maintain Xtensa backend. <br class="">
              <br class="">
              We already have the initial version of the Xtensa backend,
              based on LLVM Compiler Infrastructure, release 6.0.0. It
              was successfully tested using GCC torture testsuite and
              multiple applications. <br class="">
              <br class="">
              These are the links to LLVM and Clang repositories. <br class="">
              <br class="">
              <a class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-txt-link-freetext" href="https://github.com/espressif/llvm-xtensa" target="_blank" moz-do-not-send="true">https://github.com/espressif/llvm-xtensa</a>
              <br class="">
              <a class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-txt-link-freetext" href="https://github.com/espressif/clang-xtensa" target="_blank" moz-do-not-send="true">https://github.com/espressif/clang-xtensa</a>
              <br class="">
              <br class="">
              Current version can generate Xtensa assembly code as
              output, not object files yet, and has to be used together
              with GNU Binutils and GCC-built libraries to create object
              and binary files. <br class="">
              <br class="">
              Xtensa backend features implemented: <br class="">
              <br class="">
              - Xtensa target description(Xtnesa.td,
              XtensaTargetMachine.cpp, XtensaSubTarget.cpp) <br class="">
              - ISA desciption (XtensaInstrInfo.td,
              XtensaInstrFormats.td, XtensaREgisterInfo.td) <br class="">
              - Xtensa Call ABI (XtensaCallingConv.td,
              XtensaFrameLowering.cpp) <br class="">
              - ASM printer/parser(XtesaAsmPrinter.cpp,
              XtensaInstrPrinter.cpp, XtensaAsmParser.cpp) <br class="">
              <br class="">
              Xtensa architecture features implemented in compiler: <br class="">
              <br class="">
              - Xtensa Core Architecture instructions <br class="">
              - Code Density option <br class="">
              - Windowed Register option <br class="">
              - Floating-Point Coprocessor option <br class="">
              - Boolean option (only a subset of instructions) <br class="">
              - Thread Pointer option <br class="">
              - atomic operations <br class="">
              <br class="">
              Current Xtensa target list: <br class="">
              <br class="">
              - support Xtensa LX6 target (ESP32) by default <br class="">
              <br class="">
              Compiler optimization levels include O0/O1/O2/O3/Os
              options. <br class="">
              <br class="">
              With LLVM community approval, my next plans will be <br class="">
              <br class="">
              - rebasing on the upstream version of LLVM. <br class="">
              - object code generation (XtensaMC package) <br class="">
              - implement test cases <br class="">
              - support for LX106 target (ESP8266) <br class="">
              - improvements of generated code performance <br class="">
              - support for zero-overhead loop option <br class="">
              - MAC16 option <br class="">
              <br class="">
              There were some discussions about implementation of the
              Xtensa backend and attempt to implement it: <br class="">
              <a class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2018-July/124789.html" target="_blank" moz-do-not-send="true">http://lists.llvm.org/pipermail/llvm-dev/2018-July/124789.html</a>
              <br class="">
              <a class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2018-April/122676.html" target="_blank" moz-do-not-send="true">http://lists.llvm.org/pipermail/llvm-dev/2018-April/122676.html</a>
              <br class="">
              <br class="">
              Also there were attempts to implement a LLVM Xtensa
              backend, but recently I found only one actual link: <br class="">
              <a class="gmail-m_-3906164681750564834gmail-m_715095656130124833moz-txt-link-freetext" href="https://github.com/jdiez17/llvm-xtensa" target="_blank" moz-do-not-send="true">https://github.com/jdiez17/llvm-xtensa</a>
              <br class="">
              <br class="">
              All comments and suggesions are welcome! <br class="">
              <br class="">
              Andrei Safronov <br class="">
              <br class="">
            </div>
          </div>
          _______________________________________________<br class="">
          LLVM Developers mailing list<br class="">
          <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" moz-do-not-send="true" class="">llvm-dev@lists.llvm.org</a><br class="">
          <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" moz-do-not-send="true" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
        </blockquote>
      </div>
    </blockquote>
  </div>

_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>