public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: chenglulu <chenglulu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn, c@jia.je
Subject: Re: [PATCH 1/3] LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our own
Date: Wed, 13 Dec 2023 20:57:17 +0800	[thread overview]
Message-ID: <b45967c8-f7c7-fdcc-dee3-facfe0d7a2e1@loongson.cn> (raw)
In-Reply-To: <20231209170347.12601-3-xry111@xry111.site>

LGTM!

Thanks.

在 2023/12/10 上午1:03, Xi Ruoyao 写道:
> 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.
> ---
>   gcc/config/loongarch/loongarch-def.cc | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/config/loongarch/loongarch-def.cc b/gcc/config/loongarch/loongarch-def.cc
> index c41804a180e..6217b19268c 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)),


  reply	other threads:[~2023-12-13 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 17:03 [PATCH 0/3] LoongArch: Fix instruction costs Xi Ruoyao
2023-12-09 17:03 ` [PATCH 1/3] LoongArch: Include rtl.h for COSTS_N_INSNS instead of hard coding our own Xi Ruoyao
2023-12-13 12:57   ` chenglulu [this message]
2023-12-09 17:03 ` [PATCH 2/3] LoongArch: Fix instruction costs [PR112936] Xi Ruoyao
2023-12-13 12:22   ` chenglulu
2023-12-13 13:20     ` Xi Ruoyao
2023-12-14  1:16       ` chenglulu
2023-12-15  7:56         ` chenglulu
2023-12-17  3:02           ` chenglulu
2023-12-09 17:03 ` [PATCH 3/3] LoongArch: Add alslsi3_extend Xi Ruoyao
2023-12-13 12:58   ` chenglulu
2023-12-17 15:22 ` Pushed: [PATCH 0/3] LoongArch: Fix instruction costs Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b45967c8-f7c7-fdcc-dee3-facfe0d7a2e1@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=c@jia.je \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).