Reduce memory requirements for ranger
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 10 Dec 2020 19:59:14 +0000 (14:59 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 10 Dec 2020 21:35:01 +0000 (16:35 -0500)
commit7f359556a772e26eabf8d31e53aae1de6f2f200d
tree4d312d4baac672782765ef7cfa91b61d20eeb25a
parent779bf1823ced0814803d2be7f7ded0317e70140c
Reduce memory requirements for ranger

Calculate block exit info upfront, and then any SSA_NAME which is never
used in an outgoing range calculation is a pure global and can bypass the
on-entry cache.

PR tree-optimization/98174
* gimple-range-cache.cc (ranger_cache::ssa_range_in_bb): Only push
poor values to be examined if it isn't a pure global.
(ranger_cache::block_range): Don't process pure globals.
(ranger_cache::fill_block_cache): Adjust has_edge_range call.
* gimple-range-gori.cc (gori_map::all_outgoing): New bitmap.
(gori_map::gori_map): Allocate all_outgoing.
(gori_map::is_export_p): No specified BB returns global context.
(gori_map::calculate_gori): Accumulate each block into global.
(gori_compute::gori_compute): Preprocess each block for exports.
(gori_compute::has_edge_range_p): No edge returns global context.
* gimple-range-gori.h (has_edge_range_p): Provide default parameter.
gcc/gimple-range-cache.cc
gcc/gimple-range-gori.cc
gcc/gimple-range-gori.h