]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`
authorLehua Ding <lehua.ding@rivai.ai>
Tue, 13 Jun 2023 10:59:09 +0000 (18:59 +0800)
committerPan Li <pan2.li@intel.com>
Tue, 13 Jun 2023 14:57:07 +0000 (22:57 +0800)
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

index d797326d73618f5469318cc45c2eafba8994c755..e07d5c2901ac390d5472fe0f7963b05ff181a7ff 100644 (file)
@@ -1254,7 +1254,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,               \
@@ -1268,6 +1267,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
   }
 };