[gambit-list] Reducing the memory requirements to compile the C files generated by Gambit

Bradley Lucier lucier at math.purdue.edu
Sat Feb 21 13:53:40 EST 2009


Marc:

The gcc 4.2.* and 4.3.* series compilers have a problem dealing with
large "loops" that are "recognized" because of the computed gotos, loops
that consist of 50,000+ basic blocks in some instances.

This has been "fixed" in the 4.4.* release by attempting
loop-invariant-code-motion (LICM) at the register-transfer-language
(RTL) level only for loops with fewer than 1,000 block at -O1 and fewer
than 10,000 blocks at -O2.  Perhaps this change will be backported to
the released compiler series, but it hasn't happened yet.

Some Linux distributions (e.g., Ubuntu 8.10, Fedora 10) ship 4.3.* or
4.2.* series compilers, and so they have a really hard time compiling
some Gambit-generated programs with the default gcc options; e.g., the
compiler benchmark takes about 29 GB of memory to compile on x86-64 with
the default Gambit gcc options, see

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39157

Can you add something to the configure script to see whether
gcc-4.[23].* is being used and to add

-fno-move-loop-invariants

to the gcc options in that case?

I added some comments about this to the wiki at

http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Configure_script_options

Brad




More information about the Gambit-list mailing list