Convert ranger and clients to vrange.
authorAldy Hernandez <aldyh@redhat.com>
Sun, 22 May 2022 18:17:40 +0000 (20:17 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 1 Jun 2022 09:11:15 +0000 (11:11 +0200)
commit45c8523dd3e50daa5f0bba040099fdfd2ad1aaaa
tree9e8f023eab39b290d2c5194cea3692525a4a3d8f
parentd8474337a0b2bf1b3c84863957cef1da92811ffe
Convert ranger and clients to vrange.

Finally, the meat of the work.  Convert ranger and associated clients
to vrange.

Everything's relatively mechanical given the previous patches.  I did
include a minor cleanup in the edge code.  There's no need to check
that the type of the switch is an integer as non-integer switches are
invalid.  I verified this with an appropriately coded assert.

Tested on x86-64 & ppc64le Linux.

gcc/ChangeLog:

* gimple-range-cache.cc (ssa_block_ranges::dump): Convert to vrange.
(sbr_vector::sbr_vector): Same.
(sbr_vector::grow): Same.
(sbr_vector::set_bb_range): Same.
(sbr_vector::get_bb_range): Same.
(sbr_sparse_bitmap::sbr_sparse_bitmap): Same.
(sbr_sparse_bitmap::set_bb_range): Same.
(sbr_sparse_bitmap::get_bb_range): Same.
(block_range_cache::set_bb_range): Same.
(block_range_cache::get_bb_range): Same.
(block_range_cache::dump): Same.
(ssa_global_cache::get_global_range): Same.
(ssa_global_cache::set_global_range): Same.
(ssa_global_cache::clear): Same.
(ssa_global_cache::dump): Same.
(ranger_cache::get_global_range): Same.
(ranger_cache::set_global_range): Same.
(ranger_cache::range_of_def): Same.
(ranger_cache::entry_range): Same.
(ranger_cache::exit_range): Same.
(ranger_cache::edge_range): Same.
(ranger_cache::range_of_expr): Same.
(ranger_cache::range_on_edge): Same.
(ranger_cache::block_range): Same.
(ranger_cache::propagate_cache): Same.
(ranger_cache::fill_block_cache): Same.
(ranger_cache::range_from_dom): Same.
* gimple-range-cache.h: Same.
* gimple-range-edge.cc (gimple_outgoing_range::get_edge_range):
Same.
(gimple_outgoing_range::switch_edge_range): Same.
(gimple_outgoing_range::edge_range_p): Same.
* gimple-range-edge.h: Same.
* gimple-range-fold.cc (fur_source::get_operand): Same.
(fur_source::get_phi_operand): Same.
(fur_edge::get_operand): Same.
(fur_edge::get_phi_operand): Same.
(fur_stmt::get_operand): Same.
(fur_stmt::get_phi_operand): Same.
(fur_list::fur_list): Same.
(fur_list::get_operand): Same.
(fur_list::get_phi_operand): Same.
(fold_range): Same.
(adjust_imagpart_expr): Same.
(adjust_realpart_expr): Same.
(gimple_range_adjustment): Same.
(fold_using_range::fold_stmt): Same.
(fold_using_range::range_of_range_op): Same.
(fold_using_range::range_of_address): Same.
(fold_using_range::range_of_phi): Same.
(fold_using_range::range_of_call): Same.
(fold_using_range::range_of_builtin_call): Same.
(fold_using_range::range_of_builtin_int_call): Same.
(fold_using_range::range_of_cond_expr): Same.
(fur_source::register_outgoing_edges): Same.
* gimple-range-fold.h (fold_range): Same.
(gimple_range_type): Same.
(gimple_range_ssa_p): Same.
* gimple-range-gori.cc (gimple_range_calc_op1): Same.
(gimple_range_calc_op2): Same.
(gori_compute::compute_operand_range_switch): Same.
(gori_compute::compute_operand_range): Same.
(gori_compute::logical_combine): Same.
(gori_compute::compute_logical_operands): Same.
(gori_compute::compute_operand1_range): Same.
(gori_compute::compute_operand2_range): Same.
(gori_compute::compute_operand1_and_operand2_range): Same.
(gori_compute::outgoing_edge_range_p): Same.
(gori_compute::condexpr_adjust): Same.
* gimple-range-gori.h (gimple_range_calc_op1): Same.
(gimple_range_calc_op2): Same.
* gimple-range-path.cc (path_range_query::get_cache): Same.
(path_range_query::set_cache): Same.
(path_range_query::range_on_path_entry): Same.
(path_range_query::internal_range_of_expr): Same.
(path_range_query::range_of_expr): Same.
(path_range_query::ssa_range_in_phi): Same.
(path_range_query::range_defined_in_block): Same.
(path_range_query::compute_ranges_in_phis): Same.
(path_range_query::compute_ranges_in_block): Same.
(path_range_query::add_to_imports): Same.
(path_range_query::range_of_stmt): Same.
* gimple-range-path.h: Same.
* gimple-range-infer.cc (gimple_infer_range::add_range): Same.
(gimple_infer_range::~side_effect_manager): Same.
(gimple_infer_range::get_nonzero): Same.
(gimple_infer_range::maybe_adjust_range): Same.
(gimple_infer_range::add_range): Same.
* gimple-range-infer.h: Same.
* gimple-range-tests.cc: Same.
* gimple-range-trace.cc (range_tracer::trailer): Same.
(debug_seed_ranger): Same.
* gimple-range-trace.h: Same.
* gimple-range.cc (gimple_ranger::range_of_expr): Same.
(gimple_ranger::range_on_entry): Same.
(gimple_ranger::range_on_exit): Same.
(gimple_ranger::range_on_edge): Same.
(gimple_ranger::fold_range_internal): Same.
(gimple_ranger::range_of_stmt): Same.
(gimple_ranger::prefill_name): Same.
(gimple_ranger::prefill_stmt_dependencies): Same.
(gimple_ranger::export_global_ranges): Same.
(gimple_ranger::dump_bb): Same.
* gimple-range.h: Same.
* gimple-ssa-warn-access.cc (check_nul_terminated_array): Same.
(memmodel_to_uhwi): Same.
* tree-ssa-loop-niter.cc (refine_value_range_using_guard): Same.
(determine_value_range): Same.
(record_nonwrapping_iv): Same.
(infer_loop_bounds_from_signedness): Same.
(scev_var_range_cant_overflow): Same.
* tree-ssa-threadedge.cc (hybrid_jt_simplifier::simplify): Same.
* value-query.cc (range_query::range_on_edge): Same.
(range_query::range_of_stmt): Same.
(range_query::value_of_expr): Same.
(range_query::value_on_edge): Same.
(range_query::value_of_stmt): Same.
(range_query::get_tree_range): Same.
(update_global_range): Same.
(get_range_global): Same.
(gimple_range_global): Same.
(global_range_query::range_of_expr): Same.
(range_query::query_relation): Same.
* value-query.h (gimple_range_global): Same.
(update_global_range): Same.
* vr-values.cc (vr_values::range_of_expr): Same.
(bounds_of_var_in_loop): Same.
(simplify_using_ranges::vrp_visit_cond_stmt): Same.
* vr-values.h (class vr_values): Same.
* tree-ssa-loop-unswitch.cc (unswitch_predicate): Same.
25 files changed:
gcc/gimple-range-cache.cc
gcc/gimple-range-cache.h
gcc/gimple-range-edge.cc
gcc/gimple-range-edge.h
gcc/gimple-range-fold.cc
gcc/gimple-range-fold.h
gcc/gimple-range-gori.cc
gcc/gimple-range-gori.h
gcc/gimple-range-infer.cc
gcc/gimple-range-infer.h
gcc/gimple-range-path.cc
gcc/gimple-range-path.h
gcc/gimple-range-tests.cc
gcc/gimple-range-trace.cc
gcc/gimple-range-trace.h
gcc/gimple-range.cc
gcc/gimple-range.h
gcc/gimple-ssa-warn-access.cc
gcc/tree-ssa-loop-niter.cc
gcc/tree-ssa-loop-unswitch.cc
gcc/tree-ssa-threadedge.cc
gcc/value-query.cc
gcc/value-query.h
gcc/vr-values.cc
gcc/vr-values.h