Commit Message

Hi,
while looking into other problem I noticed that even with single partition we consider
some functions/var to be used by other partition. This is caused by bug in
partitioning code that inserts functions with same comdat group twice.
Another related problem is with partition_varpool_node_p possibly leading to
comdat functions with attribute used to be declared unused.
The patch also improves dumping, so we get body availability and other info.
Bootstrapped/regtested x86_64-linux, will commit it as obvious.
* lto/lto.c (add_cgraph_node_to_partition,
add_varpool_node_to_partition): Add debug info.
(lto_1_to_1_map, lto_balanced_map): Do not re-add already
partitioned nodes.
(do_whole_program_analysis): Set function flags before dumping.