[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Suppression méthode evaluate_litteral
Mikael Morin
mikael@gcc.gnu.org
Mon May 19 16:07:39 GMT 2025
https://gcc.gnu.org/g:ab6b048d6f95608e968dcc9064a98d9a32219235
commit ab6b048d6f95608e968dcc9064a98d9a32219235
Author: Mikael Morin <mikael@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 dea8fc52991b..bd934871c924 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
{
@@ -5836,7 +5816,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);
More information about the Gcc-cvs
mailing list