diff mbox series

[1/2] ipa: Rename ipa_supports_p to ipa_vr_supported_type_p

Message ID ri6v7z2e7sf.fsf@virgil.suse.cz
State New
Headers show
Series [1/2] ipa: Rename ipa_supports_p to ipa_vr_supported_type_p | expand

Commit Message

Martin Jambor Sept. 11, 2024, 11:42 a.m. UTC
Hi,

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.

This change has been pre-approved by Honza and has passed bootstrap and
test-suite on x86_64 and so I will push it to master later today.

Thanks,

Martin


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.
---
 gcc/ipa-cp.cc   | 5 +++--
 gcc/ipa-cp.h    | 2 +-
 gcc/ipa-prop.cc | 6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index 56468dc40ee..a1033b81aef 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 4616c61625a..ba2ebfede63 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 99ebd6229ec..78d1fb7086d 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);