On Wed, Aug 20, 2025 at 5:14 AM Andrew Pinski <andrew.pin...@oss.qualcomm.com> wrote: > > build_ref_for_offset was originally made external > with r0-95095-g3f84bf08c48ea4. The call was extracted > out into ipa_get_jf_ancestor_result by r0-110216-g310bc6334823b9. > Then the call was removed by r10-7273-gf3280e4c0c98e1. > So there is no use of build_ref_for_offset outside of SRA, so > let's make it static again. > > Bootstrapped and tested on x86_64-linux-gnu.
OK. > PR tree-optimization/121568 > gcc/ChangeLog: > > * ipa-prop.h (build_ref_for_offset): Remove. > * tree-sra.cc (build_ref_for_offset): Make static. > > Signed-off-by: Andrew Pinski <andrew.pin...@oss.qualcomm.com> > --- > gcc/ipa-prop.h | 4 ---- > gcc/tree-sra.cc | 2 +- > 2 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h > index 3bd442fff39..74c9a637837 100644 > --- a/gcc/ipa-prop.h > +++ b/gcc/ipa-prop.h > @@ -1276,10 +1276,6 @@ bool unadjusted_ptr_and_unit_offset (tree op, tree > *ret, > void ipa_get_range_from_ip_invariant (vrange &r, tree val, cgraph_node > *node); > void ipa_prop_cc_finalize (void); > > -/* From tree-sra.cc: */ > -tree build_ref_for_offset (location_t, tree, poly_int64, bool, tree, > - gimple_stmt_iterator *, bool); > - > /* In ipa-cp.cc */ > void ipa_cp_cc_finalize (void); > bool ipa_return_value_range (value_range &range, tree decl); > diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc > index 24ed2b2aea0..921664ef470 100644 > --- a/gcc/tree-sra.cc > +++ b/gcc/tree-sra.cc > @@ -1882,7 +1882,7 @@ make_fancy_name (tree expr) > the current one as specified by INSERT_AFTER. This function is not > capable > of handling bitfields. */ > > -tree > +static tree > build_ref_for_offset (location_t loc, tree base, poly_int64 offset, > bool reverse, tree exp_type, gimple_stmt_iterator *gsi, > bool insert_after) > -- > 2.43.0 >