[LLVMdev] AArch64: GHC compilation issue.
carter.schonwald at gmail.com
Thu Jan 9 14:17:15 PST 2014
Karel, step 1 of the ghc llvm porting guide
specifically says "make sure unregisterized builds with the c backend work"
On Thu, Jan 9, 2014 at 4:39 PM, Karel Gardas <karel.gardas at centrum.cz>wrote:
> small misunderstanding. I'm not dealing with unregisterised via C build,
> but with unregisterised with LLVM, which is a little bit different beast.
> On 01/ 9/14 10:23 PM, Carter Schonwald wrote:
>> Hey Karel,
>> the GHC unregisterized via C code gen requires using GCC. Unless Clang
>> starts support some of the more eclectic GCC C extensions, you wont' be
>> able to use Clang/LLVM for doing an unregisterized build.
>> GCC 4.8 and newer seems to have aarch64 support.
>> On Wed, Jan 8, 2014 at 4:51 PM, Karel Gardas <karel.gardas at centrum.cz
>> <mailto:karel.gardas at centrum.cz>> wrote:
>> Hi Tim,
>> On 01/ 8/14 10:24 PM, Tim Northover wrote:
>> 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
>> 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.
>> the bziped2 file is here for you
>> It compiles to amd64 code by default so I added just
>> 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
>> could be caused by simply swapping a -march argument to LLVM .
>> for example, wouldn't be able to compile correct C or C++ code
>> just that switch. But GHC presumably has less stringent ABI
>> compatibility requirements, so it might get away with it.
>> I hope so.
>> 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
>> to it.
>> Ah, I've not mentioned it before, but I'm attempting to port GHC to
>> AArch64 and the first step is to get so called unregisterised build
>> working. Unregisterised build does not require this specific GHC
>> convention. Once this is working I'll come here hopefully with some
>> patch or with ask for idea/help with modification of AArch64 target
>> support to make GHC calling convention a reality. But certainly I'm
>> there yet...
>> Hmm, but since you mentioned it. Has anything changed in the LLVM so
>> it's more easy to write such calling convention? IIRC, the calling
>> convention is here just to tell LLVM to omit usage of some registers
>> they are pinned to the haskell virtual registers... I hope I'm not too
>> misleading here...And in the past creating such calling convention
>> the required regs were removed was the only way probably...
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev