Commit 97bb4812 by Jan Hubicka Committed by Jan Hubicka

* lto-partition.c (lto_balanced_map): Watch overflow.

From-SVN: r257939
parent 1996c75e
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
* lto-partition.c (lto_balanced_map): Watch overflow.
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
......
......@@ -757,7 +757,8 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size)
if (npartitions < n_lto_partitions)
partition_size = total_size / (n_lto_partitions - npartitions);
else
partition_size = INT_MAX;
/* Watch for overflow. */
partition_size = INT_MAX / 16;
if (partition_size < PARAM_VALUE (MIN_PARTITION_SIZE))
partition_size = PARAM_VALUE (MIN_PARTITION_SIZE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment