[LLVMdev] Contributing the Apple ARM64 compiler backend

Alex Rosenberg
Fri, 28 Mar 2014 22:27:51 -0000

My suggestions:

1. Do #1 below as you suggested as quickly as feasible.
2. String up and flog any and all executives and lawyers who forced the world to
wait since September for this. Perhaps beat them with a big stick labeled
"Technical Debt."
3. A few minor review things that popped out at me:

libc++: _LIBCPP_NONUNIQUE_RTTI_BIT needs a block comment to explain why.
llvm:
  include/LLVM/MC/MCAsmInfo.h: ^meast^means
  Linker Optimization Hints seem to be documented in Radar. Perhaps a bit more
commenting in here?
  I also saw a few 80-column violations scroll by, and several first line
comment length issues as well.

I look forward to arm64 and the new relocations landing in lld soon as well. :-)

Alex

On Mar 28, 2014, at 12:35 PM, James Grosbach wrote:

> 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
>
>
<arm64-libc++.patch.gz><arm64-compiler-rt.patch.gz><arm64-llvm.patch.gz><arm64-clang.patch.gz>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev