> > > +/* There may be some rare false positives since we do not have another
> > > + flag to track this nonrenameability directly. */
> > > +static bool
> > > +symbol_nonrenameable (symtab_node* node)
> > > +{
> > > + return (node->must_remain_in_tu && node->ref_by_asm
> > > + && !TREE_PUBLIC (node->decl));
> > If must_remain_in_tu is used to mark funcitons/variables referring to
> > non-renameable symbols then I think either the predicate is misnamed or
> > should not test this flag them?
>
> Note that it is AND, not OR. The predicate was (almost) equivalent to
> the now split out must_remain_in_tu_name.
> I didn't want to add new flag only for this, but it was confusing.
>
> >
> > Also new Jakub's toplevel asm should support renaming. Will these have
> > ref_by_asm flag?
> >
> > Honza
>
> They have ref_by_asm and support renaming.
> Though I did disable renaming/localization of global ref_by_asm symbols,
> but local symbols are renamed.
>
>
> ---
>
> For balanced and max partitioning this adds proper partitioning of asm
> and related symbols.
>
> The special symbols are partitioned with 1to1 and joined together if
> there is no name conflict. All other symbols are partitioned with the
> requested partitioning.
> In typical usage with small number of toplevel assembly and no name
> conflicts, all special symbols will be in the single first partition.
> balanced partitioning will continue filling last asm partition.
>
> gcc/lto/ChangeLog:
>
> * lto-partition.cc (join_partitions): Declare.
> (lto_1_to_1_map): Split out to..
> (map_1_to_1): ..here.
> (create_asm_partition): Replaced by..
> (create_asm_partitions): ..this.
> (lto_max_map): Use new create_asm_partitions.
> (lto_balanced_map): Use new create_asm_partitions.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/lto/toplevel-extended-asm-2_0.c: More partitionings.
> * gcc.dg/lto/toplevel-extended-asm-2_1.c: Likewise.
> +/* Group cgrah nodes by input files. Used for symbols that must remain
^ typo
OK, thanks!
Honza