> This patch adds create_asm_partitions to cache partitioning
> to prevent issues with non-renameable symbols (while partition
> joining and splitting).
>
> All other relevant partitionings use create_asm_partitions.
> It was not used in cache partitioning, because toplevel asm
> could be in principle special handled in cache partitioning
> with marginally better results, but I never implemented it.
>
>
> map_1_to_1 has to be used twice, second time without toplevel
> asm, so I modified it to better express what should be included.
>
> lto/124289
>
> gcc/lto/ChangeLog:
>
> * lto-partition.cc (enum map1to1_content): New.
> (map_1_to_1): Use map1to1_content.
> (lto_1_to_1_map): Likewise.
> (create_asm_partitions): Likewise.
> (lto_max_map): Likewise.
> (lto_cache_map): Use create_asm_partitions.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/lto/toplevel-extended-asm-2_0.c: Add padding to asm label.
> * gcc.dg/lto/toplevel-extended-asm-2_1.c: Add padding to asm label.
> +enum map1to1_content {
> + /* Forced symbols are always attempted. */
> + map1to1_forced_symbols = 0,
> +
> + map1to1_asm = 1,
> + map1to1_other_symbols = 2,
> + map1to1_symbols = map1to1_forced_symbols | map1to1_other_symbols,
> + map1to1_forced = map1to1_asm | map1to1_forced_symbols,
> + map1to1_all = map1to1_symbols | map1to1_asm,
I think it would help to documen tthis better. I.e. mention why we want to 1to1
map forced symbols or asm and why we need the modes.
OK with that change.
Honza