Too many local registers...

Duncan Coutts duncan.coutts at
Wed Oct 31 19:36:38 EDT 2007

On Wed, 2007-10-31 at 14:40 +0100, Cristian Perfumo wrote:
> Hi,
> I did some modifications to GHC in order to read hardware counters.
> Many programs are compiled successfully, but with one of them, I have
> a problem:
> Too many local registers allocated by gcc at .../ghc-
> 6.6.1-modified/driver/mangler/ghc-asm line 1602, <INASM> line 304643.
> It's ghc 6.6.1 on an Itanium processor.

I never found a satisfactory answer. On IA64 we just hope that ghc
generates C code that does not turn into object code that uses too many
variables. We tried playing with gcc flags to make it only use the
limited number of registers but could not make it work. The only
workarounds I know of are to use less aggressive optimisation, both in
ghc and gcc, so try with -optc-O rather than -optc-O2 and try -O0 rather
than -O.


More information about the Glasgow-haskell-users mailing list