https://gcc.gnu.org/g:63ecac63bac6f2c1e7e151a4ff494f27b41b86e7

commit 63ecac63bac6f2c1e7e151a4ff494f27b41b86e7
Author: Michael Meissner <meiss...@linux.ibm.com>
Date:   Mon Jul 29 23:15:10 2024 -0400

    Make clone_targets use architecture flags.
    
    This patch expands on the previous patch and changes the target_clones 
support
    to use an architecture mask instead of isa bits.
    
    2024-07-29  Michael Meissner  <meiss...@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/rs6000.cc (struct clone_map): Switch to use 
architecture
            flags instead of ISA flags for target_clone support.
            (rs6000_clone_map): Likewise.
            (rs6000_clone_priority): Likewise.

Diff:
---
 gcc/config/rs6000/rs6000.cc | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 83ae0157a9ec..0dda6dcc5a1a 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -251,17 +251,17 @@ enum {
 
 /* Map compiler ISA bits into HWCAP names.  */
 struct clone_map {
-  HOST_WIDE_INT isa_mask;      /* rs6000_isa mask */
+  HOST_WIDE_INT arch_mask;     /* rs6000_arch_mask.  */
   const char *name;            /* name to use in __builtin_cpu_supports.  */
 };
 
 static const struct clone_map rs6000_clone_map[CLONE_MAX] = {
-  { 0,                         "" },           /* Default options.  */
-  { OPTION_MASK_CMPB,          "arch_2_05" },  /* ISA 2.05 (power6).  */
-  { OPTION_MASK_POPCNTD,       "arch_2_06" },  /* ISA 2.06 (power7).  */
-  { OPTION_MASK_P8_VECTOR,     "arch_2_07" },  /* ISA 2.07 (power8).  */
-  { OPTION_MASK_P9_VECTOR,     "arch_3_00" },  /* ISA 3.0 (power9).  */
-  { OPTION_MASK_POWER10,       "arch_3_1" },   /* ISA 3.1 (power10).  */
+  { 0,                 "" },           /* Default options.  */
+  { ARCH_MASK_POWER6,  "arch_2_05" },  /* ISA 2.05 (power6).  */
+  { ARCH_MASK_POWER7,  "arch_2_06" },  /* ISA 2.06 (power7).  */
+  { ARCH_MASK_POWER8,  "arch_2_07" },  /* ISA 2.07 (power8).  */
+  { ARCH_MASK_POWER9,  "arch_3_00" },  /* ISA 3.0 (power9).  */
+  { ARCH_MASK_POWER10, "arch_3_1" },   /* ISA 3.1 (power10).  */
 };
 
 
@@ -25408,7 +25408,7 @@ static int
 rs6000_clone_priority (tree fndecl)
 {
   tree fn_opts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
-  HOST_WIDE_INT isa_masks;
+  HOST_WIDE_INT arch_masks;
   int ret = CLONE_DEFAULT;
   tree attrs = lookup_attribute ("target", DECL_ATTRIBUTES (fndecl));
   const char *attrs_str = NULL;
@@ -25424,12 +25424,12 @@ rs6000_clone_priority (tree fndecl)
        fn_opts = target_option_default_node;
 
       if (!fn_opts || !TREE_TARGET_OPTION (fn_opts))
-       isa_masks = rs6000_isa_flags;
+       arch_masks = rs6000_arch_flags;
       else
-       isa_masks = TREE_TARGET_OPTION (fn_opts)->x_rs6000_isa_flags;
+       arch_masks = TREE_TARGET_OPTION (fn_opts)->x_rs6000_arch_flags;
 
       for (ret = CLONE_MAX - 1; ret != 0; ret--)
-       if ((rs6000_clone_map[ret].isa_mask & isa_masks) != 0)
+       if ((rs6000_clone_map[ret].arch_mask & arch_masks) != 0)
          break;
     }

Reply via email to