> > 
> > I see that you add toplevel asm statements to global stream. While this
> > work, why you don't write trees into section_asm itself?  It seems it is
> > already constructed uwing create_output_block instead of
> > create_simple_output_block so this should be possible?
> > 
> 
> Trees in the global stream are automatically fixed after decl merging.
> Other streams can only be used after decl merging is completed.
> So I used global stream for simplicity.
> 
> If we want to avoid overusing the global stream, we have to delay
> streaming of toplevel assembly until merging is complete, as below.
> 
> 
> ---
> 
> Streaming of toplevel extended assembly was missing implementation.
> 
> Streaming must be after merging of decls, otherwise we would have to
> fix the pointers to new decls.
> 
> gcc/ChangeLog:
> 
>       * lto-cgraph.cc (input_cgraph_1): Move asm to..
>       (input_toplevel_asms): ..here.
>       * lto-streamer-in.cc (lto_input_toplevel_asms):
>       Allow extended asm.
>       * lto-streamer-out.cc (lto_output_toplevel_asms):
>       Allow extended asm.
>       (lto_output_toplevel_asms): Allow ASM_EXPR.
>       * lto-streamer.h (input_toplevel_asms): New.
> 
> gcc/lto/ChangeLog:
> 
>       * lto-common.cc (read_cgraph_and_symbols): Call
>       input_toplevel_asms after decl merging.

OK,
thanks for update - I think it is cleaner this way...

Honza

Reply via email to