From 15819a7df1f673357b521daef6bda3c45c2ef49c Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 22 May 2023 12:07:15 +0200 Subject: Implement ipa_vr hashing. Implement hashing for ipa_vr. When all is said and done, all these patches incurr a 7.64% slowdown for ipa-cp, with is entirely covered by the similar 7% increase in this area last week. So we get type agnostic ranges with "infinite" range precision close to free. There is no change in overall compilation. gcc/ChangeLog: * ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Adjust for use with ipa_vr instead of value_range. (gt_pch_nx): Same. (gt_ggc_mx): Same. (ipa_get_value_range): Same. * value-range.cc (gt_pch_nx): Move to ipa-prop.cc and adjust for ipa_vr. (gt_ggc_mx): Same. --- gcc/value-range.cc | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'gcc/value-range.cc') diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 707b1f1..6f46f7c 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -1993,21 +1993,6 @@ gt_pch_nx (vrange *x, gt_pointer_operator op, void *cookie) gcc_unreachable (); } -// ?? These stubs are for ipa-prop.cc which use a value_range in a -// hash_traits. hash-traits.h defines an extern of gt_ggc_mx (T &) -// instead of picking up the gt_ggc_mx (T *) version. -void -gt_pch_nx (int_range<2> *&x) -{ - return gt_pch_nx ((irange *) x); -} - -void -gt_ggc_mx (int_range<2> *&x) -{ - return gt_ggc_mx ((irange *) x); -} - #define DEFINE_INT_RANGE_INSTANCE(N) \ template int_range::int_range(tree_node *, \ const wide_int &, \ -- cgit v1.1