Steven Bosscher wrote:
On Wed, Apr 21, 2010 at 6:56 PM, Robert Dewar <de...@adacore.com> wrote:
Actually for my taste, you have to get a MUCH bigger factor in compile
time before you can call yourself a fast compiler (Realia COBOL by
comparison compiles millions of lines a minute of code on current
PC's, using just one core).
Heh, you always bring up the Realia compiler when there's a compile
time discussion. Must have been a really impressive piece of work,
that it was so fast :-)
Another example of a compiler which compiles quickly but produces slow
code is tinycc http://www.tinycc.org/ http://repo.or.cz/w/tinycc.git
(the program is called tcc)
In my very small & rusty experience, it did happen that tcc used to
generate incorrect machine code, at least some old version of tcc did
compile some old version of MELT generated code incorrectly on x86-64
[the tcc-generated *.so crashed, while the *.so generated by GCC from
same source did run correctly].
Now, it is indeed true that TCC probably evolved since (& MELT also),
and I don't know where and how to get the newest TCC source (is the
"git clone git://repo.or.cz/tinycc.git" command enough?, the version
number seems to be 0.9.25 since more than a year...).
A useless measure of compile time (within the MELT branch, subdirectory
gcc of the build directory. warmelt-first.1.c is a generated C file of
96KLOC)
% time gcc-4.5 -g -DIN_GCC -DHAVE_CONFIG_H \
-I melt-private-build-include -I. -fPIC -c -o warmelt-first.1.pic.o
warmelt-first.1.c
gcc-4.5 -g -DIN_GCC -DHAVE_CONFIG_H -I melt-private-build-include -I.
-fPIC - 10.29s user 0.41s system 100% cpu 10.695 total
% time tcc -g -DIN_GCC -DHAVE_CONFIG_H -I melt-private-build-include
-I. -fPIC -c -o warmelt-first.1.pic.o warmelt-first.1.c
tcc -g -DIN_GCC -DHAVE_CONFIG_H -I melt-private-build-include -I. -fPIC
-c -o 0.63s user 0.03s system 99% cpu 0.660 total
The current tcc is not really usable for me, I am not able to do a melt
bootstrap (that is to compile warmelt-*.0.c into MELT modules
warmelt*0.so, use them to generate warmelt*1.c, compile them to
warmelt*1.so, and use them to generate warmelt*2.c). This MELT bootstrap
is routinely done with GCC 4.4 & GCC 4.5 (the warmelt*1.c is generated
but does not work ok).
Regards.
PS. About GCC MELT see http://gcc.gnu.org/wiki/MiddleEndLispTranslator
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***