]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ipa: Rename ipa_supports_p to ipa_vr_supported_type_p
authorMartin Jambor <mjambor@suse.cz>
Wed, 11 Sep 2024 21:53:21 +0000 (23:53 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 11 Sep 2024 21:53:40 +0000 (23:53 +0200)
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.

gcc/ipa-cp.cc
gcc/ipa-cp.h
gcc/ipa-prop.cc

index 56468dc40ee4ff2d38c42b6d2bd3ed6c0fe66755..a1033b81aefcb95fe760272fb6f782386bc88947 100644 (file)
@@ -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
index 4616c61625ab4c649bde1a6f15b76199fd971694..ba2ebfede63f5bc4e9b102bf4061b2e171a29cf5 100644 (file)
@@ -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);
 }
index 99ebd6229ec425240d866813d065f226896b270d..78d1fb7086d5e0bcf86569e084336e121f14bc44 100644 (file)
@@ -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);