[MLton] runtime optimization flags?
Adam Goode
adam at evdebs.org
Fri Nov 17 17:05:46 PST 2006
Hi,
Fedora policy[1] suggests that packaged code be built with RPM_OPT_FLAGS
unless there is good reason. Up until now, I have left the MLton
makefiles alone and not changed the flags. But now I have been asked to
look at this choice.
[1]
http://fedoraproject.org/wiki/Packaging/Guidelines#head-8b14098227aebff1cf6188939e9d0877295ac448
I have 2 questions:
1. Could changing the optimization flags of things in runtime/ and
bytecode/ cause correctness problems? I know there are issues with
aliasing for some files. But what about the align-functions things?
Would the garbage collector or stack manipulating things get
confused?
2. Might changing the optimization flags cause performance problems?
Why is -O1 often used instead of -O2? I know the stack protector
flags will cause a slight performance hit. Could MLton possibly
benefit from these flags? (Detect some C bugs?)
As reference, on my i386 FC6 machine, the flags are "-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables".
If changing these things is ok, then would it also make any sense to
change the /usr/bin/mlton script to have these RPM_OPT_FLAGS as defaults
for when MLton is invoked? I suspect there is little benefit here.
I'm leaning towards leaving things as they are, but I just want to have
some justification and documentation for my choice.
Thanks,
Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mlton.org/pipermail/mlton/attachments/20061117/9e822ae2/signature.pgp
More information about the MLton
mailing list