[LLVMdev] AArch64: GHC compilation issue.

Tim Northover t.p.northover at gmail.com
Wed Jan 8 13:24:56 PST 2014


Hi Karel,

> I've observed the same issue with LLVM 3.4 as distributed by Ubuntu 13.10
> and with LLVM HEAD compiled on January 6. I'm able to provide the byte-code
> file which results in this issue, but would first like to know if this is a
> known issue in AArch64 target support or if I shall submit it somewhere or
> even if I did some mistake in invoking llc or providing wrong set of options
> to it.

I've certainly not seen similar. Usually "Cannot select" errors are
fixed very quickly since they're so easy to narrow down and fix. I
think this is a real bug and the .ll file would be very useful.

> It compiles to amd64 code by default so I added just -march=aarch64
> and was in impression that it should be enough to target AArch64 platform...
> If that's wrong, please let me know.

That's on the edge of OK. There are numerous tricky ABI issues that
could be caused by simply swapping a -march argument to LLVM . Clang,
for example, wouldn't be able to compile correct C or C++ code with
just that switch. But GHC presumably has less stringent ABI
compatibility requirements, so it might get away with it.

On the other hand, I think x86 (and possibly ARM) has specific code to
handle the GHC calling conventions, which I'm fairly sure AArch64
doesn't. That *might* just be a matter of performance, or it might be
crucial. I kept meaning to get GHC working but never really got around
to it.

Cheers.

Tim.



More information about the llvm-dev mailing list