Happy new year!
I would like to propose promoting the
LoongArch backend from its current
experimental status to
release/16.x branch is created.
This means that the
LoongArch backend will be built by default and included in
standard binary distributions of LLVM/Clang.
LoongArch is a RISC style ISA designed by Loongson Technology in China. It has
32- and 64-bit variants and it is composed of a basic part and four extensions.
Various products (e.g. laptops, desktops, workstations, servers) powered by
LoongArch are being sold on regular shops. A large number of basic software
released their versions support
A year ago, I sent a RFC proposing adding
LoongArch backend to LLVM. Now I
think it is mature enough to be moved out of
experimental. Some bases:
- Small tests (e.g.
.c) were written when we submitted each
test-suite100% pass without errors.
A buildbot was connected to the staging area. This bot builds
-DLLVM_ENABLE_PROJECTS=clang) and tests
LoongArchmachine natively. It has been green (except
occasional broken builds caused by problematic patches) for more than 10
days. There have been some pink mark failures caused by network
connection problems. Now we have solved the network issues, and the bot
become relatively stable.
- LLVM/Clang-16 is able to build many large programs for
Gcc, Binutils, Linux, Chromium, FFMpeg, SPECCPU, etc.
- In addition to
clang, a good part of others subprojects have been ported to
LoongArch. For example,
Most components of
compiler-rtare ready to use and more patches are
under review (D140690, D140528, D139686, D140727). Basic functions of
lldbare also avialable and a few more patches are under review (D140386,
D140759, D140615). @xen0n has basically completed the
which is under review (D138135) and he plans to add extensive test coverage
I believe that we are ready to flip the switch towards an
official target. At
Loongson, we’re ready to address any issues that arise, and as noted below
we’re delighted that there’s a growing community of contributors around this
I’d like to thank everyone who submitted reviews or patches, helped with setting
up buildbot. Beside the LLVM toolchain team at
Loongson, there are many
names outside to mention. @rengolin, @xen0n, @MaskRay, @xry111,
@myhsu, @lrzlin, @gkistanova, @DavidSpickett, @prcups. I’m sorry if a name is missing.
Although becoming an official backend would be a huge milestone, of course it’s
far from the end of the road. We’ll be continuing to work on generated code
performance improvements, ISA extensions support, setting up more buildbots,
working with language communities like Rust, support for additional LLVM
What do you think? Any comments would be appreciated.