diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-12-09 15:27:28 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-12-17 19:23:28 +0800 |
commit | 5f3f11279514afaa14b4ca382c969b48fd250832 (patch) | |
tree | 0937dac91909cf5922b6d6805b57a6cd9cfeb7fd | |
parent | da70c5b17123b7c81155ef03fb4591b71a681344 (diff) | |
download | gcc-5f3f11279514afaa14b4ca382c969b48fd250832.zip gcc-5f3f11279514afaa14b4ca382c969b48fd250832.tar.gz gcc-5f3f11279514afaa14b4ca382c969b48fd250832.tar.bz2 |
LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our own
With loongarch-def.cc switched from C to C++, we can include rtl.h for
COSTS_N_INSNS, instead of hard coding our own.
THis is a non-functional change for now, but it will make the code more
future-proof in case COSTS_N_INSNS in rtl.h would be changed.
gcc/ChangeLog:
* config/loongarch/loongarch-def.cc (rtl.h): Include.
(COSTS_N_INSNS): Remove the macro definition.
-rw-r--r-- | gcc/config/loongarch/loongarch-def.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/config/loongarch/loongarch-def.cc b/gcc/config/loongarch/loongarch-def.cc index c41804a..6217b19 100644 --- a/gcc/config/loongarch/loongarch-def.cc +++ b/gcc/config/loongarch/loongarch-def.cc @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "tm.h" +#include "rtl.h" #include "loongarch-def.h" #include "loongarch-str.h" @@ -89,8 +90,6 @@ array_tune<loongarch_align> loongarch_cpu_align = .set (CPU_LA464, la464_align ()) .set (CPU_LA664, la464_align ()); -#define COSTS_N_INSNS(N) ((N) * 4) - /* Default RTX cost initializer. */ loongarch_rtx_cost_data::loongarch_rtx_cost_data () : fp_add (COSTS_N_INSNS (1)), |