On Thu, Jun 30, 2011 at 16:24, Gabriel Charette <gch...@google.com> wrote:
> first/weak_global_object_name are part of the global state.
>
> This seems to be used to produce the assembler names. They are set only once 
> as early as possible in the parsing; thus we should define it to be whatever 
> it was in the first pph (or even in the C file if it was set before any pph 
> was even loaded.
>
> I'm not sure exactly what this does, but trying to find a fix for the asm 
> diffs this is the first thing that I hit in the compiler logic that was 
> different in the good compiler vs the pph compiler. With this fix this bit of 
> logic is now correct.
> However, this doesn't fix any pph test (nor does it even change any pph asm 
> (I diff'ed the old bad assemblies (*.s+pph) with the new ones)).

This does not look right to me.  These two symbols are set when
calling notice_global_symbol, which is done during code generation
(you will see it called from cgraph_finalize_function,
cgraph_mark_reachable_node, etc).

You are probably close to the cause of this relative ordering problem,
but streaming these two globals is not the solution.  They both should
be set in the same order by both compilers, but not by forcing them
this way.

One thing that may be happening here is that the order in which we
call cgraph_finalize_function is different in the two compilers.
That's what needs to change.  One thing you could do is set a
breakpoint in notice_global_symbol.  The two compilers should be
calling it in the same order.


Diego.

Reply via email to