diff options
author | Martin Liska <mliska@suse.cz> | 2020-01-16 20:44:27 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-01-16 20:44:27 +0100 |
commit | f48c6014133c8989702458f9082e34ba6dd326d4 (patch) | |
tree | ce1b8361278df0dc73d9f0604e1046a67129eb8a | |
parent | 98d56ea8900fdcff8f1987cf2bf499a5b7399857 (diff) | |
download | gcc-f48c6014133c8989702458f9082e34ba6dd326d4.zip gcc-f48c6014133c8989702458f9082e34ba6dd326d4.tar.gz gcc-f48c6014133c8989702458f9082e34ba6dd326d4.tar.bz2 |
Fix noreorder symbol partitioning reversion.
* lto-partition.c (lto_balanced_map): Remember
best_noreorder_pos and then restore to it
when we revert.
-rw-r--r-- | gcc/lto/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/lto-partition.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 821a6fa..2b930cb 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2020-01-16 Martin Liska <mliska@suse.cz> + + * lto-partition.c (lto_balanced_map): Remember + best_noreorder_pos and then restore to it + when we revert. + 2020-01-08 Martin Liska <mliska@suse.cz> * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 3a99909..8e0488a 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -471,6 +471,7 @@ void lto_balanced_map (int n_lto_partitions, int max_partition_size) { int n_varpool_nodes = 0, varpool_pos = 0, best_varpool_pos = 0; + int best_noreorder_pos = 0; auto_vec <cgraph_node *> order (symtab->cgraph_count); auto_vec<cgraph_node *> noreorder; auto_vec<varpool_node *> varpool_order; @@ -732,6 +733,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) best_i = i; best_n_nodes = lto_symtab_encoder_size (partition->encoder); best_varpool_pos = varpool_pos; + best_noreorder_pos = noreorder_pos; } if (dump_file) fprintf (dump_file, "Step %i: added %s, size %i, " @@ -752,6 +754,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) i - best_i, best_i); undo_partition (partition, best_n_nodes); varpool_pos = best_varpool_pos; + noreorder_pos = best_noreorder_pos; } gcc_assert (best_size == partition->insns); i = best_i; |