ticket for adding ARM backend to NCG?

Simon Marlow marlowsd at gmail.com
Sat Jan 4 09:47:28 UTC 2014


On 03/01/14 12:37, Simon Peyton-Jones wrote:
> | I've been tinkering with ARM NCG idea for quite some time now, but
> | honestly I've been always in doubts if it's the best way for GHC at all.
> | I've thought that the plan was to kind of move out of NCG to LLVM based
> | backends and I've though that although this plan may be kind of stuck
> | now, it's still on the table.
>
> I have not been following the ARM and LLVM threads very closely, but here's my take:
>
> * LLVM is (I hope) very much on the table. LLVM itself is a well-resourced project,
>    and we can expect it to continue to exist.  We should piggy-back on all the
>    hard work that is going into it.
>
> * But using LLVM has some disadvantages.
>    a) it imposes a dependency on LLVM
>    b) it makes compilation slower

Correct

>    c) we play some efficiency tricks (notably "tables next to code") that
>       LLVM can't play (yet).  I think.

Actually we have to generate tables-next-to-code from LLVM too, because 
the LLVM and NCG backends must be compatible (you can choose to use LLVM 
on a module-by-module basis using -fllvm).  So tables-next-to-code is 
currently done using a post-processing step on the asm generated by LLVM.

Cheers,
	Simon


> So GHC currently aims to have a built-in NCG for popular platforms, and to rely on LLVM for more esoteric platforms and also for superior optimisation.
>
> Is this still a sensible policy?
>
> Maybe you can articulate your doubts on the ARM NCG?
>
> Simon
>
> | -----Original Message-----
> | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of Karel
> | Gardas
> | Sent: 03 January 2014 11:24
> | To: Jens Petersen
> | Cc: ghc-devs at haskell.org
> | Subject: Re: ticket for adding ARM backend to NCG?
> |
> |
> | Guys,
> |
> | I've been tinkering with ARM NCG idea for quite some time now, but
> | honestly I've been always in doubts if it's the best way for GHC at all.
> | I've thought that the plan was to kind of move out of NCG to LLVM based
> | backends and I've though that although this plan may be kind of stuck
> | now, it's still on the table.
> |
> | Yes, I know that GHC is volunteering effort so if someone comes and asks
> | for an ARM NCG implementation merge it'll be probably done in some time,
> | but I'm not sure if it's what's the most welcome at the end.
> |
> | Just some of my doubts about it...
> |
> | I would really appreciate some authoritative word about the topic from
> | more involved GHC developers... I mean especially about NCG future...
> |
> | Thanks!
> | Karel
> |
> | On 01/ 3/14 09:35 AM, Jens Petersen wrote:
> | > On 3 January 2014 03:10, Corey O'Connor <coreyoconnor at gmail.com
> | > <mailto:coreyoconnor at gmail.com>> wrote:
> | >
> | >     My interest is just to get involved somehow in the NCG. Starting a
> | >     new backend seemed reasonable only because I couldn't break
> | >     something that didn't exist. ;-)
> | >
> | >
> | > Well a big +1 from me for armv7 NCG.
> | >
> | >
> | > _______________________________________________
> | > ghc-devs mailing list
> | > ghc-devs at haskell.org
> | > http://www.haskell.org/mailman/listinfo/ghc-devs
> |
> | _______________________________________________
> | ghc-devs mailing list
> | ghc-devs at haskell.org
> | http://www.haskell.org/mailman/listinfo/ghc-devs
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



More information about the ghc-devs mailing list