* [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.
@ 2022-10-11 6:31 juzhe.zhong
2022-10-12 3:39 ` Kito Cheng
0 siblings, 1 reply; 4+ messages in thread
From: juzhe.zhong @ 2022-10-11 6:31 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, Ju-Zhe Zhong
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
gcc/ChangeLog:
* config/riscv/riscv-vector-builtins.cc: Change include files same as ARM SVE.
* config/riscv/t-riscv: Refine makefile.
---
gcc/config/riscv/riscv-vector-builtins.cc | 9 +++++++--
gcc/config/riscv/t-riscv | 14 ++++++++------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
index 4814b6ef6e7..61f5f9802cf 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -33,17 +33,22 @@
#include "recog.h"
#include "diagnostic.h"
#include "expr.h"
+#include "basic-block.h"
#include "function.h"
#include "fold-const.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
#include "gimplify.h"
#include "explow.h"
+#include "emit-rtl.h"
+#include "tree-vector-builder.h"
#include "stor-layout.h"
+#include "regs.h"
#include "alias.h"
+#include "gimple-fold.h"
#include "langhooks.h"
#include "stringpool.h"
#include "attribs.h"
-#include "targhooks.h"
-#include "regs.h"
#include "riscv-vector-builtins.h"
using namespace riscv_vector;
diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv
index 2f060437c23..82010721348 100644
--- a/gcc/config/riscv/t-riscv
+++ b/gcc/config/riscv/t-riscv
@@ -6,12 +6,14 @@ riscv-builtins.o: $(srcdir)/config/riscv/riscv-builtins.cc $(CONFIG_H) \
$(srcdir)/config/riscv/riscv-builtins.cc
riscv-vector-builtins.o: $(srcdir)/config/riscv/riscv-vector-builtins.cc \
- $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
- memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) $(EXPR_H) \
- $(FUNCTION_H) fold-const.h gimplify.h explow.h stor-layout.h $(REGS_H) \
- alias.h langhooks.h attribs.h stringpool.h \
- $(srcdir)/config/riscv/riscv-vector-builtins.h \
- $(srcdir)/config/riscv/riscv-vector-builtins.def
+ $(srcdir)/config/riscv/riscv-vector-builtins.def \
+ $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
+ $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) \
+ $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
+ gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
+ stor-layout.h $(REG_H) alias.h gimple-fold.h langhooks.h \
+ stringpool.h \
+ $(srcdir)/config/riscv/riscv-vector-builtins.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/riscv/riscv-vector-builtins.cc
--
2.36.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.
2022-10-11 6:31 [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile juzhe.zhong
@ 2022-10-12 3:39 ` Kito Cheng
2022-10-12 3:48 ` juzhe.zhong
2022-10-12 3:56 ` Jeff Law
0 siblings, 2 replies; 4+ messages in thread
From: Kito Cheng @ 2022-10-12 3:39 UTC (permalink / raw)
To: juzhe.zhong; +Cc: gcc-patches
I would suggest we do not include those header files unless we really need that.
On Tue, Oct 11, 2022 at 2:32 PM <juzhe.zhong@rivai.ai> wrote:
>
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vector-builtins.cc: Change include files same as ARM SVE.
> * config/riscv/t-riscv: Refine makefile.
>
> ---
> gcc/config/riscv/riscv-vector-builtins.cc | 9 +++++++--
> gcc/config/riscv/t-riscv | 14 ++++++++------
> 2 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
> index 4814b6ef6e7..61f5f9802cf 100644
> --- a/gcc/config/riscv/riscv-vector-builtins.cc
> +++ b/gcc/config/riscv/riscv-vector-builtins.cc
> @@ -33,17 +33,22 @@
> #include "recog.h"
> #include "diagnostic.h"
> #include "expr.h"
> +#include "basic-block.h"
> #include "function.h"
> #include "fold-const.h"
> +#include "gimple.h"
> +#include "gimple-iterator.h"
> #include "gimplify.h"
> #include "explow.h"
> +#include "emit-rtl.h"
> +#include "tree-vector-builder.h"
> #include "stor-layout.h"
> +#include "regs.h"
> #include "alias.h"
> +#include "gimple-fold.h"
> #include "langhooks.h"
> #include "stringpool.h"
> #include "attribs.h"
> -#include "targhooks.h"
> -#include "regs.h"
> #include "riscv-vector-builtins.h"
>
> using namespace riscv_vector;
> diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv
> index 2f060437c23..82010721348 100644
> --- a/gcc/config/riscv/t-riscv
> +++ b/gcc/config/riscv/t-riscv
> @@ -6,12 +6,14 @@ riscv-builtins.o: $(srcdir)/config/riscv/riscv-builtins.cc $(CONFIG_H) \
> $(srcdir)/config/riscv/riscv-builtins.cc
>
> riscv-vector-builtins.o: $(srcdir)/config/riscv/riscv-vector-builtins.cc \
> - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
> - memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) $(EXPR_H) \
> - $(FUNCTION_H) fold-const.h gimplify.h explow.h stor-layout.h $(REGS_H) \
> - alias.h langhooks.h attribs.h stringpool.h \
> - $(srcdir)/config/riscv/riscv-vector-builtins.h \
> - $(srcdir)/config/riscv/riscv-vector-builtins.def
> + $(srcdir)/config/riscv/riscv-vector-builtins.def \
> + $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
> + $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) \
> + $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
> + gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
> + stor-layout.h $(REG_H) alias.h gimple-fold.h langhooks.h \
> + stringpool.h \
> + $(srcdir)/config/riscv/riscv-vector-builtins.h
> $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
> $(srcdir)/config/riscv/riscv-vector-builtins.cc
>
> --
> 2.36.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.
2022-10-12 3:39 ` Kito Cheng
@ 2022-10-12 3:48 ` juzhe.zhong
2022-10-12 3:56 ` Jeff Law
1 sibling, 0 replies; 4+ messages in thread
From: juzhe.zhong @ 2022-10-12 3:48 UTC (permalink / raw)
To: kito.cheng; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]
OK. I am gonna commit this with the following patches.
juzhe.zhong@rivai.ai
From: Kito Cheng
Date: 2022-10-12 11:39
To: juzhe.zhong
CC: gcc-patches
Subject: Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.
I would suggest we do not include those header files unless we really need that.
On Tue, Oct 11, 2022 at 2:32 PM <juzhe.zhong@rivai.ai> wrote:
>
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vector-builtins.cc: Change include files same as ARM SVE.
> * config/riscv/t-riscv: Refine makefile.
>
> ---
> gcc/config/riscv/riscv-vector-builtins.cc | 9 +++++++--
> gcc/config/riscv/t-riscv | 14 ++++++++------
> 2 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
> index 4814b6ef6e7..61f5f9802cf 100644
> --- a/gcc/config/riscv/riscv-vector-builtins.cc
> +++ b/gcc/config/riscv/riscv-vector-builtins.cc
> @@ -33,17 +33,22 @@
> #include "recog.h"
> #include "diagnostic.h"
> #include "expr.h"
> +#include "basic-block.h"
> #include "function.h"
> #include "fold-const.h"
> +#include "gimple.h"
> +#include "gimple-iterator.h"
> #include "gimplify.h"
> #include "explow.h"
> +#include "emit-rtl.h"
> +#include "tree-vector-builder.h"
> #include "stor-layout.h"
> +#include "regs.h"
> #include "alias.h"
> +#include "gimple-fold.h"
> #include "langhooks.h"
> #include "stringpool.h"
> #include "attribs.h"
> -#include "targhooks.h"
> -#include "regs.h"
> #include "riscv-vector-builtins.h"
>
> using namespace riscv_vector;
> diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv
> index 2f060437c23..82010721348 100644
> --- a/gcc/config/riscv/t-riscv
> +++ b/gcc/config/riscv/t-riscv
> @@ -6,12 +6,14 @@ riscv-builtins.o: $(srcdir)/config/riscv/riscv-builtins.cc $(CONFIG_H) \
> $(srcdir)/config/riscv/riscv-builtins.cc
>
> riscv-vector-builtins.o: $(srcdir)/config/riscv/riscv-vector-builtins.cc \
> - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) \
> - memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) $(EXPR_H) \
> - $(FUNCTION_H) fold-const.h gimplify.h explow.h stor-layout.h $(REGS_H) \
> - alias.h langhooks.h attribs.h stringpool.h \
> - $(srcdir)/config/riscv/riscv-vector-builtins.h \
> - $(srcdir)/config/riscv/riscv-vector-builtins.def
> + $(srcdir)/config/riscv/riscv-vector-builtins.def \
> + $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
> + $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) \
> + $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
> + gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
> + stor-layout.h $(REG_H) alias.h gimple-fold.h langhooks.h \
> + stringpool.h \
> + $(srcdir)/config/riscv/riscv-vector-builtins.h
> $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
> $(srcdir)/config/riscv/riscv-vector-builtins.cc
>
> --
> 2.36.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.
2022-10-12 3:39 ` Kito Cheng
2022-10-12 3:48 ` juzhe.zhong
@ 2022-10-12 3:56 ` Jeff Law
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Law @ 2022-10-12 3:56 UTC (permalink / raw)
To: gcc-patches
On 10/11/22 21:39, Kito Cheng via Gcc-patches wrote:
> I would suggest we do not include those header files unless we really need that.
Agreed. Policy is to include what's needed. There's actually some
scripts that will identify extraneous header includes, but I don't
recall if we ever ran them on the target files -- the focus was much
more on starting to cut the ties between RTL and gimple/tree bits in the
generic parts of GCC.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-12 3:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 6:31 [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile juzhe.zhong
2022-10-12 3:39 ` Kito Cheng
2022-10-12 3:48 ` juzhe.zhong
2022-10-12 3:56 ` Jeff Law
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).