https://gcc.gnu.org/g:39acf3c9dd767626b422843adb8f5be06206af08

commit r16-3302-g39acf3c9dd767626b422843adb8f5be06206af08
Author: Andrew Pinski <andrew.pin...@oss.qualcomm.com>
Date:   Tue Aug 19 16:14:57 2025 -0700

    sra: Make build_ref_for_offset static [PR121568]
    
    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.
    
            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>

Diff:
---
 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 3bd442fff395..74c9a6378370 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 24ed2b2aea0e..921664ef470b 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)

Reply via email to