[MLton] Darwin/PPC changes
Stephen Weeks
MLton@mlton.org
Mon, 27 Sep 2004 16:07:39 -0700
Thanks for the excellent patch, Filip (and Luke). It was easy to
integrate. A few notes.
1. I think your solution to the make/gmake issue was overkill. Rather
than putting the knowledge about whether to use gmake or make in lots
of places and modifying lots of Makefiles to pass along $(MAKE), it
seems better to have a single shell script that invokes make or gmake
as appropriate. Right now, I have such a script in my personal bin/
directory, but perhaps it makes sense to move it to mlton/bin/ and
make sure that is on the PATH in our Makefiles and scripts. Does
anyone have any objections to this solution, or better ideas?
2. Rather than adding -DMLton_Darwin whenever we call gcc, I added a
single directive to the top of platform.h to define __Darwin__.
#if (defined (__APPLE_CC__))
#define __Darwin__
#endif
Hopefully this (or some other similarly easy solution) works.
3. When building the binary tgz for distribution, should I put stuff
in /usr or /usr/local?
4. I see that you left time profiling disabled in main.fun, but that
you did update the appropriate places in gc.c to handle it. Should it
be enabled in main.fun?
5. I will look into the real.sml regression soon. The fix will
probably be to disable some of the tests, since it is just a low-order
bits problem.
6. I didn't have any speed issues like you did. It takes about 25
minutes to self compile on my 1.8GHz G5 with 1.5G RAM. Here is the
log.
MLton starting
Compile SML starting
pre codegen starting
pre codegen finished in 247.48 + 101.87 (29% GC)
C code gen starting
C code gen finished in 16.72 + 1.03 (6% GC)
Compile SML finished in 264.31 + 102.90 (28% GC)
Compile C and Assemble starting
Compile C and Assemble finished in 1088.10 + 0.50 (0% GC)
Link starting
Link finished in 0.50 + 0.00 (0% GC)
MLton finished in 1353.54 + 103.86 (7% GC)
Compare that to a MLton built with the C codegen, recompiling itself
(using the C codegen) on my 1.6GHz Athlon with 4G RAM.
MLton starting
Compile SML starting
pre codegen starting
pre codegen finished in 285.30 + 117.40 (29% GC)
C code gen starting
C code gen finished in 17.81 + 1.12 (6% GC)
Compile SML finished in 303.25 + 118.52 (28% GC)
Compile C and Assemble starting
Compile C and Assemble finished in 1590.38 + 0.48 (0% GC)
Link starting
Link finished in 19.85 + 0.00 (0% GC)
MLton finished in 1913.81 + 119.18 (6% GC)
They look quite comparable to me. I look forward to seeing a speedup
similar to what we get on x86 from a native codegen for PowerPC :-).