ghc sparc NCG

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Jun 12 13:07:36 EDT 2006


On Mon, 2006-06-12 at 18:38 +0200, Georg Sauthoff wrote:
> On Fri, Jun 02, 2006 at 03:59:01PM +0100, Duncan Coutts wrote:

> > On Fri, 2006-06-02 at 15:10 +0200, Georg Sauthoff wrote:
> > > at http://hackage.haskell.org/trac/ghc/wiki/Platforms I read, that the
> > > Sparc NCG 'is bitrotted' - does that mean, that it is unmaintained, but
> > > used by default at sparc?
>  
> > No it means that GHC uses compilation via C on sparc.
> 
> ok - after reading http://hackage.haskell.org/trac/ghc/ticket/186 - the
> Sparc NCG was active until 6.2 and disabled at >= 6.4.

Yeah.

> > > I am asking because the solaris sparc system has a ghc 6.2 installed,
> [..]
> > So if someone were to take up maintainership and fix the bitrotted sparc
> > NCG then we could use -fasm again rather than the default being -fvia-C
> > and benefit from quicker compile times.
> 
> Besides quicker compile times - does the NCG generates better code (more
> efficient - or is the via -fvia-c generated code less efficient)?

At the moment -fvia-C is produces somewhat faster code than -fasm on all
arches. Though the difference varies between arches, I've heard that
-fsam is very nearly on par with -fvia-C on x86-64.

Historically the main reason for -fasm has been quicker code generation.
That's not to say it always has to be that way. The NCGs could be made
to use more sophisticated algorithms for various things like register
allocation.

Duncan



More information about the Glasgow-haskell-users mailing list