diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-07-06 18:46:47 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-07-06 16:46:47 +0000 |
commit | 0eaf0bfe94ff5a7c69cb8f108fd94c6b91409820 (patch) | |
tree | ef83493d1737c9105dfdd3d5053218e4415d1de3 /gcc/lto/lto-partition.c | |
parent | b0a12b5e4612ba1c4013e0f2549b82f0690c9458 (diff) | |
download | gcc-0eaf0bfe94ff5a7c69cb8f108fd94c6b91409820.zip gcc-0eaf0bfe94ff5a7c69cb8f108fd94c6b91409820.tar.gz gcc-0eaf0bfe94ff5a7c69cb8f108fd94c6b91409820.tar.bz2 |
cgraphunit.c (cgraph_node::finalize_function): When !flag_toplevel_reorde set no_reorder flag.
* cgraphunit.c (cgraph_node::finalize_function): When
!flag_toplevel_reorde set no_reorder flag.
(varpool_node::finalize_decl): Likewise.
(symbol_table::compile): Drop no toplevel reorder path.
* lto-partition.c (lto_balanced_map): Do not check
flag_toplevel_reorder.
From-SVN: r250034
Diffstat (limited to 'gcc/lto/lto-partition.c')
-rw-r--r-- | gcc/lto/lto-partition.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 3600ab2..3141ece 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -506,7 +506,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) /* Collect all variables that should not be reordered. */ FOR_EACH_VARIABLE (vnode) if (vnode->get_partitioning_class () == SYMBOL_PARTITION - && (!flag_toplevel_reorder || vnode->no_reorder)) + && vnode->no_reorder) varpool_order.safe_push (vnode); n_varpool_nodes = varpool_order.length (); varpool_order.qsort (varpool_node_cmp); @@ -547,7 +547,8 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) } add_sorted_nodes (next_nodes, partition); - add_symbol_to_partition (partition, order[i]); + if (!symbol_partitioned_p (order[i])) + add_symbol_to_partition (partition, order[i]); if (!order[i]->alias) total_size -= ipa_fn_summaries->get (order[i])->size; @@ -634,7 +635,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) vnode = dyn_cast <varpool_node *> (ref->referred); if (!vnode->definition) continue; - if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder + if (!symbol_partitioned_p (vnode) && !vnode->no_reorder && vnode->get_partitioning_class () == SYMBOL_PARTITION) add_symbol_to_partition (partition, vnode); @@ -672,7 +673,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) because it allows them to be removed. Coupling with objects they refer to only helps to reduce number of symbols promoted to hidden. */ - if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder + if (!symbol_partitioned_p (vnode) && !vnode->no_reorder && !vnode->can_remove_if_no_refs_p () && vnode->get_partitioning_class () == SYMBOL_PARTITION) @@ -767,14 +768,10 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) next_nodes.truncate (0); /* Varables that are not reachable from the code go into last partition. */ - if (flag_toplevel_reorder) - { - FOR_EACH_VARIABLE (vnode) - if (vnode->get_partitioning_class () == SYMBOL_PARTITION - && !symbol_partitioned_p (vnode) - && !vnode->no_reorder) - next_nodes.safe_push (vnode); - } + FOR_EACH_VARIABLE (vnode) + if (vnode->get_partitioning_class () == SYMBOL_PARTITION + && !symbol_partitioned_p (vnode)) + next_nodes.safe_push (vnode); /* Output remaining ordered symbols. */ while (varpool_pos < n_varpool_nodes) |