https://gcc.gnu.org/g:b1109c22d78002f9ed4ef30fb275d7beb7554199

commit r16-146-gb1109c22d78002f9ed4ef30fb275d7beb7554199
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Mon Mar 24 22:32:54 2025 -0700

    icf: Remove unused constructors of sem_function and sem_variable
    
    The constructors for sem_function and sem_variable that just
    passes the bitmap obstack and NOT the cgraph node was unused
    so let's remove it.
    
    gcc/ChangeLog:
    
            * ipa-icf.cc (sem_function::sem_function): Remove
            the obstack argument version one.
            (sem_variable::sem_variable): Likewise.
            * ipa-icf.h (sem_function): Remove ctor for
            obstack argument only one.
            (sem_variable): Likewise.
    
    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Diff:
---
 gcc/ipa-icf.cc | 14 --------------
 gcc/ipa-icf.h  |  5 -----
 2 files changed, 19 deletions(-)

diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc
index c273032cae2d..b354fb1e704c 100644
--- a/gcc/ipa-icf.cc
+++ b/gcc/ipa-icf.cc
@@ -233,16 +233,6 @@ void sem_item::set_hash (hashval_t hash)
 
 hash_map<const_tree, hashval_t> sem_item::m_type_hash_cache;
 
-/* Semantic function constructor that uses STACK as bitmap memory stack.  */
-
-sem_function::sem_function (bitmap_obstack *stack)
-  : sem_item (FUNC, stack), memory_access_types (), m_alias_sets_hash (0),
-    m_checker (NULL), m_compared_func (NULL)
-{
-  bb_sizes.create (0);
-  bb_sorted.create (0);
-}
-
 sem_function::sem_function (cgraph_node *node, bitmap_obstack *stack)
   : sem_item (FUNC, node, stack), memory_access_types (),
     m_alias_sets_hash (0), m_checker (NULL), m_compared_func (NULL)
@@ -1646,10 +1636,6 @@ sem_function::bb_dict_test (vec<int> *bb_dict, int 
source, int target)
     return (*bb_dict)[source] == target;
 }
 
-sem_variable::sem_variable (bitmap_obstack *stack): sem_item (VAR, stack)
-{
-}
-
 sem_variable::sem_variable (varpool_node *node, bitmap_obstack *stack)
 : sem_item (VAR, node, stack)
 {
diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h
index c2854ed44960..4c9094c19506 100644
--- a/gcc/ipa-icf.h
+++ b/gcc/ipa-icf.h
@@ -308,8 +308,6 @@ private:
 class sem_function: public sem_item
 {
 public:
-  /* Semantic function constructor that uses STACK as bitmap memory stack.  */
-  sem_function (bitmap_obstack *stack);
 
   /*  Constructor based on callgraph node _NODE.
       Bitmap STACK is used for memory allocation.  */
@@ -419,9 +417,6 @@ private:
 class sem_variable: public sem_item
 {
 public:
-  /* Semantic variable constructor that uses STACK as bitmap memory stack.  */
-  sem_variable (bitmap_obstack *stack);
-
   /*  Constructor based on callgraph node _NODE.
       Bitmap STACK is used for memory allocation.  */

Reply via email to