https://gcc.gnu.org/g:9b5c6e05c8766827742f0daf3bf8dfcda76acc3e

commit 9b5c6e05c8766827742f0daf3bf8dfcda76acc3e
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Mar 4 10:32:35 2025 +0100

    Suppression méthode evaluate_litteral

Diff:
---
 gcc/cgraphunit.cc | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index 8a207f3b30fb..1bcf56daded8 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -2563,7 +2563,6 @@ class exec_context
   unsigned next_alloc_index;
   //void add_variables (const exec_context &);
   data_value evaluate_constructor (tree cstr) const;
-  data_value evaluate_literal (enum tree_code code, tree value) const;
   data_value evaluate_unary (enum tree_code code, tree arg) const;
   template <typename A, typename L>
   void add_variables (vec<tree, A, L> *variables, unsigned vars_count);
@@ -3724,25 +3723,6 @@ exec_context::evaluate_unary (enum tree_code code, tree 
arg) const
     }
 }
 
-data_value
-exec_context::evaluate_literal (enum tree_code code, tree value) const
-{
-  data_value result(TREE_TYPE (value));
-  switch (code)
-    {
-    case INTEGER_CST:
-      {
-       wide_int wi_val = wi::to_wide (value);
-       result.set_cst (wi_val);
-      }
-      break;
-
-    default:
-      gcc_unreachable ();
-    }
-  return result;
-}
-
 void
 exec_context::decompose_ref (tree data_ref, data_storage * & storage, int & 
offset) const
 {
@@ -5832,7 +5812,7 @@ exec_context_evaluate_literal_tests ()
 
   tree cst = build_int_cst (integer_type_node, 13);
 
-  data_value val = ctx.evaluate_literal (INTEGER_CST, cst);
+  data_value val = ctx.evaluate (cst);
   ASSERT_EQ (val.classify (), VAL_CONSTANT);
   wide_int wi_value = val.get_cst ();
   ASSERT_PRED1 (wi::fits_shwi_p, wi_value);

Reply via email to