"Unable to find a register to spill in class `SIREG'."
simonmar at microsoft.com
Mon Dec 3 12:01:24 EST 2001
> Mon, 3 Dec 2001 12:54:01 -0000, Simon Marlow
> <simonmar at microsoft.com> pisze:
> > That will likely hurt performance quite a bit (I don't have figures,
> > but I guess 10-20%).
> I've heard that guessing about performance means nothing compared to
> measuring :-)
> > Often the cause is some inlining or other optimisations that put
> > extra strain on gcc's register allocator, so it is usually best to
> > try to track down and avoid these.
> 7 modules of 52 in qforeign are affected. It's hard to avoid: using
> FFI is often enough to cause the problem. It's annoying that the
> compiler can't figure out itself how it should compile things and I
> must mark modules explicitly, and that what should be marked depends
> on versions of compilers and options, so even if it works in some
> environment it can break in another.
> Is it possible to apply this setting to parts of a module (e.g. parts
> using FFI)?. I mean that ghc would do it itself.
It could be done automatically, but that means running gcc twice on an
affected module. Of course, the right thing to do is to have GHC emit a
warning and re-run gcc. You'd still want to give the -monly-n-regs
options to speed up compilation, but at least it wouldn't bomb out if
you left them out.
It can't be done for just parts of the file, unfortunately.
More information about the Glasgow-haskell-bugs