From: Saurabh Jha <[email protected]>

The values of neoversev2_dispatch_constraint_type, like TOTAL_SLOTS and
BS01_PIPE, can be used for other cores that have similar pipes. To make
it reusable, this change adds a "NEOVERSEV2_" prefix to each enum value
of neoversev2_dispatch_constraint_type.

Regression tested on aarch64-linux-gnu and found no regressions.

gcc/ChangeLog:
        * config/aarch64/tuning_models/neoversev2.h
        (enum neoversev2_dispatch_constraint_type): Add NEOVERSEV2_
        prefix to all values of this enum.
        (neoversev2_dispatch_constraint_callback): Change references to
        neoversev2_dispatch_constraint_type values.
---
 gcc/config/aarch64/tuning_models/neoversev2.h | 80 +++++++++----------
 1 file changed, 40 insertions(+), 40 deletions(-)

diff --git a/gcc/config/aarch64/tuning_models/neoversev2.h 
b/gcc/config/aarch64/tuning_models/neoversev2.h
index 734089772517e..a5bd62b355281 100644
--- a/gcc/config/aarch64/tuning_models/neoversev2.h
+++ b/gcc/config/aarch64/tuning_models/neoversev2.h
@@ -193,15 +193,15 @@ static const struct cpu_vector_cost 
neoversev2_vector_cost =
 /* Neoverse V2 dispatch constraint types.  */
 enum neoversev2_dispatch_constraint_type
 {
-  TOTAL_SLOTS, /* total slots  */
-  BS01_PIPE,   /* b, s0, s1 pipelines  */
-  M0_PIPE,     /* m0 pipeline  */
-  M_PIPE,      /* m pipelines  */
-  BSM_PIPE,    /* b, s, m pipelines  */
-  V02_PIPE,    /* v0, v2 pipelines  */
-  V13_PIPE,    /* v1, v3 pipelines  */
-  V_PIPE,      /* v pipelines  */
-  L_PIPE       /* l pipelines  */
+  NEOVERSEV2_TOTAL_SLOTS, /* total slots.  */
+  NEOVERSEV2_BS01_PIPE,   /* b, s0, s1 pipelines.  */
+  NEOVERSEV2_M0_PIPE,     /* m0 pipeline.  */
+  NEOVERSEV2_M_PIPE,      /* m pipelines.  */
+  NEOVERSEV2_BSM_PIPE,    /* b, s, m pipelines.  */
+  NEOVERSEV2_V02_PIPE,    /* v0, v2 pipelines.  */
+  NEOVERSEV2_V13_PIPE,    /* v1, v3 pipelines.  */
+  NEOVERSEV2_V_PIPE,      /* v pipelines.  */
+  NEOVERSEV2_L_PIPE       /* l pipelines.  */
 };
 
 /* Neoverse V2 dispatch constraints for instruction scheduling.  */
@@ -233,88 +233,88 @@ neoversev2_dispatch_constraint_callback (rtx_insn *insn)
       break;
 
     case NEOVERSEV2_DISPATCH_BS01:
-      constraints.safe_push ({BS01_PIPE, 1});
-      constraints.safe_push ({BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BS01_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_BSM:
-      constraints.safe_push ({BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_M:
-      constraints.safe_push ({M_PIPE, 1});
-      constraints.safe_push ({BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_M0:
-      constraints.safe_push ({M0_PIPE, 1});
-      constraints.safe_push ({M_PIPE, 1});
-      constraints.safe_push ({BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M0_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_V02:
-      constraints.safe_push ({V02_PIPE, 1});
-      constraints.safe_push ({V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V02_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_V13:
-      constraints.safe_push ({V13_PIPE, 1});
-      constraints.safe_push ({V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V13_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_V:
-      constraints.safe_push ({V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_L01:
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_L:
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_BSM_L:
-      constraints.safe_push ({BSM_PIPE, 1});
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_M_L:
-      constraints.safe_push ({M_PIPE, 1});
-      constraints.safe_push ({BSM_PIPE, 1});
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_M0_V:
-      constraints.safe_push ({M0_PIPE, 1});
-      constraints.safe_push ({M_PIPE, 1});
-      constraints.safe_push ({BSM_PIPE, 1});
-      constraints.safe_push ({V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M0_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_M_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_BSM_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_V_V13:
-      constraints.safe_push ({V_PIPE, 2});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 2});
       total_slots = 2;
       break;
 
     case NEOVERSEV2_DISPATCH_V_L:
-      constraints.safe_push ({V_PIPE, 1});
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
 
     case NEOVERSEV2_DISPATCH_L01_D:
-      constraints.safe_push ({L_PIPE, 2});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 2});
       total_slots = 2;
       break;
 
     case NEOVERSEV2_DISPATCH_L01_V:
-      constraints.safe_push ({V_PIPE, 1});
-      constraints.safe_push ({L_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_V_PIPE, 1});
+      constraints.safe_push ({NEOVERSEV2_L_PIPE, 1});
       break;
     }
 
   /* Add total slots constraint  */
-  constraints.safe_push ({TOTAL_SLOTS, total_slots});
+  constraints.safe_push ({NEOVERSEV2_TOTAL_SLOTS, total_slots});
 
   return constraints;
 }
-- 
2.56.0

Reply via email to