For many years, the default gcc compile options for C code generated
by Gambit, the Scheme->C compiler, were very simple (-O1 -fschedule-
insns2 -fno-math-errno -fno-trapping-math) and I didn't have problems
with gcc's space requirements to compile those files. (I often ran
into complexity issues with the algorithms, but people here fixed
those over the years.
Recently, Marc Feeley used a genetic algorithm to find better compile
options for Gambit-generated code; he found that performance
increased by about 30% with more aggressive optimizations (but not
gcse, yet ;-).
With these new options I can't compile necessary Gambit-generated C
files on darwin-ppc in 2 GB of space, with or without modulo
scheduling. I'm sure that the same thing will happen on other
architectures for slightly larger files.
I filed
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29374
that gives an example of gcc requiring inordinate (to my mind)
amounts of memory to compile a program. Perhaps someone would like
to look at this PR and give some perspective on the space
requirements I'm seeing.
Brad