aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2024-09-11 23:53:21 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2024-09-11 23:53:40 +0200
commit323291c29c77e3214f4850129bb8a3d0d8da6a45 (patch)
tree97f9f956c2af537b5e4641e1de6703bfa5aeea2f /gcc
parent670cfd5fe6433ee8f2e86eedb197d2523dbb033b (diff)
downloadgcc-323291c29c77e3214f4850129bb8a3d0d8da6a45.zip
gcc-323291c29c77e3214f4850129bb8a3d0d8da6a45.tar.gz
gcc-323291c29c77e3214f4850129bb8a3d0d8da6a45.tar.bz2
ipa: Rename ipa_supports_p to ipa_vr_supported_type_p
ipa_supports_p is not a name that captures well what the predicate determines. Therefore, this patch renames it to ipa_vr_supported_type_p. gcc/ChangeLog: 2024-09-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.h (ipa_supports_p): Rename to ipa_vr_supported_type_p. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Adjust called function name. (propagate_vr_across_jump_function): Likewise. * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Likewise. (ipcp_get_parm_bits): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ipa-cp.cc5
-rw-r--r--gcc/ipa-cp.h2
-rw-r--r--gcc/ipa-prop.cc6
3 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index 56468dc..a1033b8 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -1649,7 +1649,8 @@ ipa_vr_operation_and_type_effects (vrange &dst_vr,
enum tree_code operation,
tree dst_type, tree src_type)
{
- if (!ipa_supports_p (dst_type) || !ipa_supports_p (src_type))
+ if (!ipa_vr_supported_type_p (dst_type)
+ || !ipa_vr_supported_type_p (src_type))
return false;
range_op_handler handler (operation);
@@ -2553,7 +2554,7 @@ propagate_vr_across_jump_function (cgraph_edge *cs, ipa_jump_func *jfunc,
ipa_range_set_and_normalize (op_vr, op);
if (!handler
- || !ipa_supports_p (operand_type)
+ || !ipa_vr_supported_type_p (operand_type)
/* Sometimes we try to fold comparison operators using a
pointer type to hold the result instead of a boolean
type. Avoid trapping in the sanity check in
diff --git a/gcc/ipa-cp.h b/gcc/ipa-cp.h
index 4616c61..ba2ebfe 100644
--- a/gcc/ipa-cp.h
+++ b/gcc/ipa-cp.h
@@ -294,7 +294,7 @@ bool values_equal_for_ipcp_p (tree x, tree y);
/* Return TRUE if IPA supports ranges of TYPE. */
static inline bool
-ipa_supports_p (tree type)
+ipa_vr_supported_type_p (tree type)
{
return irange::supports_p (type) || prange::supports_p (type);
}
diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index 99ebd62..78d1fb7 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -2392,8 +2392,8 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
else
{
if (param_type
- && ipa_supports_p (TREE_TYPE (arg))
- && ipa_supports_p (param_type)
+ && ipa_vr_supported_type_p (TREE_TYPE (arg))
+ && ipa_vr_supported_type_p (param_type)
&& get_range_query (cfun)->range_of_expr (vr, arg, cs->call_stmt)
&& !vr.undefined_p ())
{
@@ -5761,7 +5761,7 @@ ipcp_get_parm_bits (tree parm, tree *value, widest_int *mask)
ipcp_transformation *ts = ipcp_get_transformation_summary (cnode);
if (!ts
|| vec_safe_length (ts->m_vr) == 0
- || !ipa_supports_p (TREE_TYPE (parm)))
+ || !ipa_vr_supported_type_p (TREE_TYPE (parm)))
return false;
int i = ts->get_param_index (current_function_decl, parm);