[MLton-devel] Fwd: Re: pretty damn good

Matthew Fluet fluet@CS.Cornell.EDU
Tue, 5 Nov 2002 13:37:24 -0500 (EST)


> I  would  say  that it is easier to change gcc flags now with the mlton shell
> script then it would be to hardwire them into the mlton executable,  even  if
> there  were  flags to override.  This way they are clearly documented and can
> be changed just by editing a text file.

Well, main.sml is just another text file. ;)  But, yes, a recompile is a
fairly heavyweight change.  As a compromise position, why not just push
the default set of flags into the mlton shell script the way the default
-lm option is there?  So, instead of

doit "$lib" \
	"$gcc" -w -fomit-frame-pointer -fno-strength-reduce \
	-mcpu=pentiumpro -malign-loops=2 -falign-jumps=2 -falign-functions=5 \
	-fschedule-insns -fschedule-insns2 END \
	-lm "$@"

we could have

doit "$lib" \
        -cc "$gcc -w -fomit-frame-pointer -fno-strength-reduce ..." \
        -lm "$@"

and a second -cc on the command line would reset the switches, while
-ccopt would add to the switches.

> I am trying to remember why we switched to -O1.  I  seem  to  recall  vaguely
> that  it  was  because of some slow down in -O2 compilation combined with the
> fact that for the native case it doesn't buy much since none of the real code
> is  in  C  (except the runtime system, and that is (should be?) compiled with
> -O2).

Don't know about this.



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel