[MLton] fixing -codegen c -profile time for the release

skaller skaller@users.sourceforge.net
Thu, 17 Nov 2005 04:35:21 +1100

> >
> > http://felix.sourceforge.net/papers/mercury_to_c.ps
> >
> > and involves inserting 'Assembler Labels' into the code
> > in such a way they cannot be elided.
> This is precisely the mechanism that we have been using.  The problem is 
> not preventing gcc from eliding the assembler labels, it is preventing gcc 
> from duplicating the labels.  Felix will suffer from exactly the same 
> problem that MLton is facing if gcc decides to duplicate a block that 
> makes use of the FLX_LABEL macro.

I see. Hmm. I have not run into this. AT least, I don't
think so :)

Why would it blindly duplicate a block? Is it assuming the 
block contains only local symbols??

Gcc is not free to duplicate code that contains
a global symbol. And the labels are marked global,
and gcc knows it (that's what the "g" annotation
is for I think).

I presume you have a specific test case where
gcc is doing this .. I'm kind of curious what
makes it think it can duplicate a pubdef.
You seem to be indicating it is simply *ignoring*
the annotation which proclaims the symbol as a pubdef.
If so .. it would have to be a BUG in gcc, wouldn't it?

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net