diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-18 10:48:08 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-18 10:48:08 +0000 |
commit | e71f2f1cf1acedf371ab77a40422386dfed5808b (patch) | |
tree | c6a80631779e3b69a52e0c1027c4cbc0d2195e7b /gcc/lto/lto.c | |
parent | 3aeeb4e8a29fa7ae4176ce7e780bd3afd2dfc1fa (diff) | |
download | gcc-e71f2f1cf1acedf371ab77a40422386dfed5808b.tar.gz |
PR lto/23754
* lto.c (lto_1_to_1_map): Don't create empty partitions.
(lto_balanced_map): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index f13ee0e03f2..4323c4fa6f4 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1516,7 +1516,8 @@ lto_1_to_1_map (void) for (node = cgraph_nodes; node; node = node->next) { - if (!partition_cgraph_node_p (node)) + if (!partition_cgraph_node_p (node) + || node->aux) continue; file_data = node->local.lto_file_data; @@ -1545,13 +1546,13 @@ lto_1_to_1_map (void) npartitions++; } - if (!node->aux) - add_cgraph_node_to_partition (partition, node); + add_cgraph_node_to_partition (partition, node); } for (vnode = varpool_nodes; vnode; vnode = vnode->next) { - if (!partition_varpool_node_p (vnode)) + if (!partition_varpool_node_p (vnode) + || vnode->aux) continue; file_data = vnode->lto_file_data; slot = pointer_map_contains (pmap, file_data); @@ -1565,8 +1566,7 @@ lto_1_to_1_map (void) npartitions++; } - if (!vnode->aux) - add_varpool_node_to_partition (partition, vnode); + add_varpool_node_to_partition (partition, vnode); } for (node = cgraph_nodes; node; node = node->next) node->aux = NULL; @@ -1675,8 +1675,9 @@ lto_balanced_map (void) for (i = 0; i < n_nodes; i++) { - if (!order[i]->aux) - add_cgraph_node_to_partition (partition, order[i]); + if (order[i]->aux) + continue; + add_cgraph_node_to_partition (partition, order[i]); total_size -= inline_summary (order[i])->size; /* Once we added a new node to the partition, we also want to add @@ -1856,6 +1857,8 @@ lto_balanced_map (void) } i = best_i; /* When we are finished, avoid creating empty partition. */ + while (i < n_nodes - 1 && order[i + 1]->aux) + i++; if (i == n_nodes - 1) break; partition = new_partition (""); |