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_optio...
Brad
Afficher les réponses par date
Could someone with a gcc 4.2 or 4.3 check that the new configure script (on the repository) detects these versions correctly and produces a message indicating that the -fno-move-loop-invariants option has been used automatically?
Marc
On 21-Feb-09, at 1:53 PM, Bradley Lucier wrote:
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_optio...
Brad
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Hello Marc.
Tue, 24 Feb 2009 12:28:55 -0500, feeley wrote:
Could someone with a gcc 4.2 or 4.3 check that the new configure script (on the repository) detects these versions correctly and produces a message indicating that the -fno-move-loop-invariants option has been used automatically?
gcc 4.3.3 on an openSUSE 11.0 box works as expected: ... checking whether gcc433 accepts -fno-move-loop-invariants... -fno-move-loop-invariants ...
And:
Congratulations for your election into the Scheme Steering Committee!
Sven
-- Dr. Sven Hartrumpf e-mail: Sven.Hartrumpf BEI fernuni-hagen.de Computer Science VII phone: +49 2331 987 4553 University of Hagen fax: +49 2331 987 392 58084 Hagen - Germany WWW: http://pi7.fernuni-hagen.de/hartrumpf/
On Tue, 2009-02-24 at 12:28 -0500, Marc Feeley wrote:
Could someone with a gcc 4.2 or 4.3 check that the new configure script (on the repository) detects these versions correctly and produces a message indicating that the -fno-move-loop-invariants option has been used automatically? Marc
With gcc-4.1.2 on a dual 2GHz G5 running Fedora 10, -fno-move-loop- invariants is not added to the command line and
[lucier@descartes gambc-v4_4_1-devel]$ ./configure CC=/pkgs/gcc-4.1.2/ bin/gcc --enable-single-host --enable-multiple-versions [lucier@descartes gambc-v4_4_1-devel]$ time make -j 2 505.369u 20.073s 4:52.24 179.7% 0+0k 128+132184io 0pf+0w
with gcc-4.3.2, -fno-move-loop-invariants is added to the command line and
[lucier@descartes gambc-v4_4_1-devel]$ ./configure --enable-single- host --enable-multiple-versions [lucier@descartes gambc-v4_4_1-devel]$ time make -j 2 281.834u 12.300s 2:35.83 188.7% 0+0k 0+101728io 0pf+0w
with gcc-4.3.2 and removing -fno-move-loop-invariants from the makefiles by hand:
[lucier@descartes gambc-v4_4_1-devel]$ time make -j 2 302.113u 14.224s 2:49.94 186.1% 0+0k 0+101784io 0pf+0w
With gcc-4.4.0, -fno-move-loop-invariants is not added to the command line and before the gcc fix went in
[lucier@descartes gambc-v4_4_1-devel]$ time make -j 2 450.618u 22.100s 4:09.31 189.6% 0+0k 1768+130864io 13pf+0w
and after the fix went in:
[lucier@descartes gambc-v4_4_1-devel]$ time make -j 2 434.837u 22.023s 4:04.33 186.9% 0+0k 0+130856io 0pf+0w
So it looks like the configure changes work. (And I wish 4.4 were faster, but it hasn't been released yet, so there's still hope ...)
Brad
On Tue, 2009-02-24 at 12:28 -0500, Marc Feeley wrote:
Could someone with a gcc 4.2 or 4.3 check that the new configure script (on the repository) detects these versions correctly and produces a message indicating that the -fno-move-loop-invariants option has been used automatically?
Marc:
I'm really appreciating this change on my 2GHz G5 running Fedora 10. It makes such a difference, perhaps fewer people will jump on the "Gambit needs 19GB of RAM to compile `hello world'" bandwagon.
Brad