[MLton] fixing -codegen c -profile time for the release
skaller
skaller@users.sourceforge.net
Thu, 17 Nov 2005 06:35:40 +1100
On Wed, 2005-11-16 at 19:07 +0100, Florian Weimer wrote:
Thanks for this information!!
> No, "g" means "any register, memory or immediate operand". Your
> snippet works by sheer luck only.
It isn't luck :) I mean I am lucky, but the design
is almost certain to prevent optimisation.
The code is always a member of a C++ class
virtual non-static member function, and it is not
called in the same compilation unit, the only calls
are made in a different compilation unit via virtual
dispatch. In fact .. the code lives in shared library
by default and is called by a driver program that
dlopen() it.. so not even the linker could inline it.
Also the code is entirely free of any C loops and blocks.
Felix generates flat code with gotos exclusively.
The class objects are always heap allocated too.
And finally .. Felix already does much more aggressive
inlinling than gcc does (it inlines EVERYTHING!! Well,
almost .. :)
None of this is true for functions .. but I only use
assembler labels in procedures -- to support fast
resumption of microthreads by computed gotos.
I understand why the example you gave could fail.
Thanks! At least I understand the problem now.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net