[LLVMdev] Contributing the Apple ARM64 compiler backend

James Grosbach
Fri, 28 Mar 2014 19:35:52 -0000

All,

Attached below are the patches that make up the Apple ARM64 compiler backend (in
addition to compiler_rt, libc++ and lldb support), and we'd like to start
the process of integrating them into mainline LLVM.  We and ARM have discussed a
general approach to integrating them into mainline and look forward to working
through this with the community at large.

First a bit of context to help jump-start the discussion. The ARM64 backend is a
complete production quality implementation for ARM’s 64-bit architecture,
AArch64. It supports both iOS and Linux as target platforms. In the source tree,
the backend co-exists with the AArch64 backend without conflicts.

As a first step, we'd like to add this as a peer of the AArch64 backend.
While having two AArch64 backends in the tree long term doesn’t make sense, this
approach worked well when the Sparc backends were merged and for AMDIL. This
will allow us to work quickly towards merging the ports to create a backend that
is truly the best of both. The public AArch64 backend has attracted an excellent
core group of contributors all of whom have done great work and we are very much
looking forward to collaborating with them and the rest of the community to make
this happen.

Getting to that idillic end-state of one AArch64 backend in the tree which
encompasses the best of both is going to take a fair bit of work and a lot of
discussion amongst the interested parties. To get there, I think a rough roadmap
like the following makes sense:

1. Import the ARM64 backend into the public tree so it’s easily accessible for
everyone to investigate.
2. Test it. Benchmark it. Explore it. Get data for the community to work with
about the state of the back end. ARM has some excellent data that will help
guide us here.
3. Identify the core backend to build on and to merge features and tuning from
the other to. The data I have seen so far leads me to believe ARM64 is the
correct choice here, but that’s a decision primarily for the contributors above.
4. Clean up the codebase (C++11-ify it, for example), fix any regressions and
test failures identified in benchmarking.

This will give us a backend that is a superset of both ARM64 and AArch64 in
terms both of performance and functionality. We can then consolidate to a single
backend, named AArch64 for consistency with the current public tree.

Regards,
Jim Grosbach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm64-libc++.patch.gz
Type: application/x-gzip
Size: 1249 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140328/ecaab42b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm64-compiler-rt.patch.gz
Type: application/x-gzip
Size: 2240 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140328/ecaab42b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm64-llvm.patch.gz
Type: application/x-gzip
Size: 705735 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140328/ecaab42b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm64-clang.patch.gz
Type: application/x-gzip
Size: 109888 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140328/ecaab42b/attachment-0003.bin>