diff mbox series

[V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

Message ID 20230613105909.820090-1-lehua.ding@rivai.ai
State New
Headers show
Series [V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` | expand

Commit Message

Lehua Ding June 13, 2023, 10:59 a.m. UTC
Hi,

This patch remove the duplicate `#include "riscv-vector-switch.def"` statement
and add #undef for ENTRY and TUPLE_ENTRY macros later.

Best,
Lehua

gcc/ChangeLog:

        * config/riscv/riscv-v.cc (struct mode_vtype_group): Remove duplicate #include.
        (ENTRY): Undef.
        (TUPLE_ENTRY): Undef.

---
 gcc/config/riscv/riscv-v.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

钟居哲 June 13, 2023, 10:59 a.m. UTC | #1
LGTM. 
Thanks.
Will merge it soon.


juzhe.zhong@rivai.ai
 
From: Lehua Ding
Date: 2023-06-13 18:59
To: gcc-patches; juzhe.zhong
Subject: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`
Hi,
 
This patch remove the duplicate `#include "riscv-vector-switch.def"` statement
and add #undef for ENTRY and TUPLE_ENTRY macros later.
 
Best,
Lehua
 
gcc/ChangeLog:
 
        * config/riscv/riscv-v.cc (struct mode_vtype_group): Remove duplicate #include.
        (ENTRY): Undef.
        (TUPLE_ENTRY): Undef.
 
---
gcc/config/riscv/riscv-v.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
 
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index e1b85a5af91f..09c2abcbc623 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -1210,7 +1210,6 @@ struct mode_vtype_group
   ratio_for_min_vlen64[MODE##mode] = RATIO_FOR_MIN_VLEN64;                     \
   vlmul_for_for_vlen128[MODE##mode] = VLMUL_FOR_MIN_VLEN128;                   \
   ratio_for_for_vlen128[MODE##mode] = RATIO_FOR_MIN_VLEN128;
-#include "riscv-vector-switch.def"
#define TUPLE_ENTRY(MODE, REQUIREMENT, SUBPART_MODE, NF, VLMUL_FOR_MIN_VLEN32, \
    RATIO_FOR_MIN_VLEN32, VLMUL_FOR_MIN_VLEN64,                \
    RATIO_FOR_MIN_VLEN64, VLMUL_FOR_MIN_VLEN128,               \
@@ -1224,6 +1223,8 @@ struct mode_vtype_group
   vlmul_for_for_vlen128[MODE##mode] = VLMUL_FOR_MIN_VLEN128;                   \
   ratio_for_for_vlen128[MODE##mode] = RATIO_FOR_MIN_VLEN128;
#include "riscv-vector-switch.def"
+#undef ENTRY
+#undef TUPLE_ENTRY
   }
};
Lehua Ding June 13, 2023, 11:07 a.m. UTC | #2
> LGTM. 
> Thanks.
> Will merge it soon.


Thank you for such a prompt reply.
 
  
diff mbox series

Patch

diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index e1b85a5af91f..09c2abcbc623 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -1210,7 +1210,6 @@  struct mode_vtype_group
   ratio_for_min_vlen64[MODE##mode] = RATIO_FOR_MIN_VLEN64;                     \
   vlmul_for_for_vlen128[MODE##mode] = VLMUL_FOR_MIN_VLEN128;                   \
   ratio_for_for_vlen128[MODE##mode] = RATIO_FOR_MIN_VLEN128;
-#include "riscv-vector-switch.def"
 #define TUPLE_ENTRY(MODE, REQUIREMENT, SUBPART_MODE, NF, VLMUL_FOR_MIN_VLEN32, \
 		    RATIO_FOR_MIN_VLEN32, VLMUL_FOR_MIN_VLEN64,                \
 		    RATIO_FOR_MIN_VLEN64, VLMUL_FOR_MIN_VLEN128,               \
@@ -1224,6 +1223,8 @@  struct mode_vtype_group
   vlmul_for_for_vlen128[MODE##mode] = VLMUL_FOR_MIN_VLEN128;                   \
   ratio_for_for_vlen128[MODE##mode] = RATIO_FOR_MIN_VLEN128;
 #include "riscv-vector-switch.def"
+#undef ENTRY
+#undef TUPLE_ENTRY
   }
 };