Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches




On 5/5/23 14:46, Jakub Jelinek wrote:

On Fri, May 05, 2023 at 03:37:47PM +, Tamar Christina wrote:

2023-05-05  Jakub Jelinek  

* Makefile.in (check_p_numbers): Rename to one_to_, move
earlier with helper variables also renamed.
(MATCH_SPLUT_SEQ): Use $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_))
instead of $(shell seq 1 $(NUM_MATCH_SPLITS)).
(check_p_subdirs): Use $(one_to_) instead of $(check_p_numbers).


Passed bootstrap/regtest on x86_64-linux and i686-linux, ok for trunk?

OK.
jeff


Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 03:37:47PM +, Tamar Christina wrote:
> > 2023-05-05  Jakub Jelinek  
> > 
> > * Makefile.in (check_p_numbers): Rename to one_to_, move
> > earlier with helper variables also renamed.
> > (MATCH_SPLUT_SEQ): Use $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_))
> > instead of $(shell seq 1 $(NUM_MATCH_SPLITS)).
> > (check_p_subdirs): Use $(one_to_) instead of $(check_p_numbers).

Passed bootstrap/regtest on x86_64-linux and i686-linux, ok for trunk?

Jakub



Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
On Fri, May 5, 2023 at 11:38 AM Tamar Christina 
wrote:

> > -Original Message-
> > From: Jakub Jelinek 
> > Sent: Friday, May 5, 2023 4:33 PM
> > To: Tamar Christina 
> > Cc: Jeff Law ; David Edelsohn  >;
> > GCC Patches 
> > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> > configurable.
> >
> > On Fri, May 05, 2023 at 03:22:11PM +, Tamar Christina wrote:
> > > > We require GNU make, so perhaps we could use something like
> > > > $(wordlist
> > > > 1,$(NUM_MATCH_SPLITS),$(check_p_numbers))
> > > > instead of
> > > > $(shell seq 1 $(NUM_MATCH_SPLITS))
> > > > provided we move the check_p_numbers definition earlier (or perhaps
> > > > bettter rename it to something more generic, so that it is clear
> > > > that is a variable holding numbers from 1 to .
> > >
> > > I'm currently testing
> > >
> > > NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ -
> > MATCH_SPLITS_SEQ =
> > > $(shell seq 1 $(NUM_MATCH_SPLITS))
> > > +MATCH_SPLITS_SEQ = $(shell echo {1..$(NUM_MATCH_SPLITS)})
> > >
> > > Which seems to work since it looks like we require an sh compatible
> shell.
> > >
> > > Question is this right? From the existing
> >
> > AIX /bin/sh certainly doesn't handle that.
>
> Wow, wonder what sh version it has..
>
> >
> > But what do I know about AIX...
>
> Same..
>

AIX defaults to Korn Shell.

I always use Bash on AIX to build GCC and recommend Bash in the GCC build
instructions for AIX.

Do we want to require Bash?  Bash is a more self-contained requirement than
seq from coreutils.

Thanks, David


>
> >
> > This seems to work and we use it already in the Makefile.
> > If something else works portably, we could change both spots...
> >
> > 2023-05-05  Jakub Jelinek  
> >
> >   * Makefile.in (check_p_numbers): Rename to one_to_, move
> >   earlier with helper variables also renamed.
> >   (MATCH_SPLUT_SEQ): Use $(wordlist
> > 1,$(NUM_MATCH_SPLITS),$(one_to_))
> >   instead of $(shell seq 1 $(NUM_MATCH_SPLITS)).
> >   (check_p_subdirs): Use $(one_to_) instead of
> > $(check_p_numbers).
> >
> > --- gcc/Makefile.in.jj2023-05-05 16:02:37.180575333 +0200
> > +++ gcc/Makefile.in   2023-05-05 17:20:27.923251821 +0200
> > @@ -214,9 +214,19 @@ rtl-ssa-warn = $(STRICT_WARN)
> > GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn)
> > $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN))
> > $(NOCOMMON_FLAG) $($@-warn)  GCC_WARN_CXXFLAGS =
> > $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
> >
> > +# 1 2 3 ... 
> > +one_to__0:=1 2 3 4 5 6 7 8 9
> > +one_to__1:=0 $(one_to__0)
> > +one_to__2:=$(foreach i,$(one_to__0),$(addprefix
> > +$(i),$(one_to__1))) one_to__3:=$(addprefix
> > 0,$(one_to__1))
> > +$(one_to__2) one_to__4:=$(foreach
> > +i,$(one_to__0),$(addprefix $(i),$(one_to__3)))
> > +one_to__5:=$(addprefix 0,$(one_to__3)) $(one_to__4)
> > +one_to__6:=$(foreach i,$(one_to__0),$(addprefix
> > +$(i),$(one_to__5)))
> > +one_to_:=$(one_to__0) $(one_to__2) $(one_to__4)
> > +$(one_to__6)
> > +
> >  # The number of splits to be made for the match.pd files.
> >  NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ -
> > MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
> > +MATCH_SPLITS_SEQ = $(wordlist
> > 1,$(NUM_MATCH_SPLITS),$(one_to_))
> >  GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc,
> > $(MATCH_SPLITS_SEQ))  GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-
> > match-%.o, $(MATCH_SPLITS_SEQ))  GENERIC_MATCH_PD_SEQ_SRC =
> > $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) @@ -4234,18
> > +4244,10 @@ $(patsubst %,%-subtargets,$(lang_checks)
> > check_p_tool=$(firstword $(subst _, ,$*))
> >  check_p_count=$(check_$(check_p_tool)_parallelize)
> >  check_p_subno=$(word 2,$(subst _, ,$*))
> > -check_p_numbers0:=1 2 3 4 5 6 7 8 9
> > -check_p_numbers1:=0 $(check_p_numbers0) -
> > check_p_numbers2:=$(foreach i,$(check_p_numbers0),$(addprefix
> > $(i),$(check_p_numbers1))) -check_p_numbers3:=$(addprefix
> > 0,$(check_p_numbers1)) $(check_p_numbers2) -
> > check_p_numbers4:=$(foreach i,$(check_p_numbers0),$(addprefix
> > $(i),$(check_p_numbers3))) -check_p_numbers5:=$(addprefix
> > 0,$(check_p_numbers3)) $(check_p_numbers4) -
> > check_p_numbers6:=$(foreach i,$(check_p_num

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message-
> From: Jakub Jelinek 
> Sent: Friday, May 5, 2023 4:33 PM
> To: Tamar Christina 
> Cc: Jeff Law ; David Edelsohn ;
> GCC Patches 
> Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> On Fri, May 05, 2023 at 03:22:11PM +, Tamar Christina wrote:
> > > We require GNU make, so perhaps we could use something like
> > > $(wordlist
> > > 1,$(NUM_MATCH_SPLITS),$(check_p_numbers))
> > > instead of
> > > $(shell seq 1 $(NUM_MATCH_SPLITS))
> > > provided we move the check_p_numbers definition earlier (or perhaps
> > > bettter rename it to something more generic, so that it is clear
> > > that is a variable holding numbers from 1 to .
> >
> > I'm currently testing
> >
> > NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ -
> MATCH_SPLITS_SEQ =
> > $(shell seq 1 $(NUM_MATCH_SPLITS))
> > +MATCH_SPLITS_SEQ = $(shell echo {1..$(NUM_MATCH_SPLITS)})
> >
> > Which seems to work since it looks like we require an sh compatible shell.
> >
> > Question is this right? From the existing
> 
> AIX /bin/sh certainly doesn't handle that.

Wow, wonder what sh version it has..

> 
> But what do I know about AIX...

Same..

> 
> This seems to work and we use it already in the Makefile.
> If something else works portably, we could change both spots...
> 
> 2023-05-05  Jakub Jelinek  
> 
>   * Makefile.in (check_p_numbers): Rename to one_to_, move
>   earlier with helper variables also renamed.
>   (MATCH_SPLUT_SEQ): Use $(wordlist
> 1,$(NUM_MATCH_SPLITS),$(one_to_))
>   instead of $(shell seq 1 $(NUM_MATCH_SPLITS)).
>   (check_p_subdirs): Use $(one_to_) instead of
> $(check_p_numbers).
> 
> --- gcc/Makefile.in.jj2023-05-05 16:02:37.180575333 +0200
> +++ gcc/Makefile.in   2023-05-05 17:20:27.923251821 +0200
> @@ -214,9 +214,19 @@ rtl-ssa-warn = $(STRICT_WARN)
> GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn)
> $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN))
> $(NOCOMMON_FLAG) $($@-warn)  GCC_WARN_CXXFLAGS =
> $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
> 
> +# 1 2 3 ... 
> +one_to__0:=1 2 3 4 5 6 7 8 9
> +one_to__1:=0 $(one_to__0)
> +one_to__2:=$(foreach i,$(one_to__0),$(addprefix
> +$(i),$(one_to__1))) one_to__3:=$(addprefix
> 0,$(one_to__1))
> +$(one_to__2) one_to__4:=$(foreach
> +i,$(one_to__0),$(addprefix $(i),$(one_to__3)))
> +one_to__5:=$(addprefix 0,$(one_to__3)) $(one_to__4)
> +one_to__6:=$(foreach i,$(one_to__0),$(addprefix
> +$(i),$(one_to__5)))
> +one_to_:=$(one_to__0) $(one_to__2) $(one_to__4)
> +$(one_to__6)
> +
>  # The number of splits to be made for the match.pd files.
>  NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ -
> MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
> +MATCH_SPLITS_SEQ = $(wordlist
> 1,$(NUM_MATCH_SPLITS),$(one_to_))
>  GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc,
> $(MATCH_SPLITS_SEQ))  GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-
> match-%.o, $(MATCH_SPLITS_SEQ))  GENERIC_MATCH_PD_SEQ_SRC =
> $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) @@ -4234,18
> +4244,10 @@ $(patsubst %,%-subtargets,$(lang_checks)
> check_p_tool=$(firstword $(subst _, ,$*))
>  check_p_count=$(check_$(check_p_tool)_parallelize)
>  check_p_subno=$(word 2,$(subst _, ,$*))
> -check_p_numbers0:=1 2 3 4 5 6 7 8 9
> -check_p_numbers1:=0 $(check_p_numbers0) -
> check_p_numbers2:=$(foreach i,$(check_p_numbers0),$(addprefix
> $(i),$(check_p_numbers1))) -check_p_numbers3:=$(addprefix
> 0,$(check_p_numbers1)) $(check_p_numbers2) -
> check_p_numbers4:=$(foreach i,$(check_p_numbers0),$(addprefix
> $(i),$(check_p_numbers3))) -check_p_numbers5:=$(addprefix
> 0,$(check_p_numbers3)) $(check_p_numbers4) -
> check_p_numbers6:=$(foreach i,$(check_p_numbers0),$(addprefix
> $(i),$(check_p_numbers5)))
> -check_p_numbers:=$(check_p_numbers0) $(check_p_numbers2)
> $(check_p_numbers4) $(check_p_numbers6)  check_p_subdir=$(subst _,,$*)
> check_p_subdirs=$(wordlist 1,$(check_p_count),$(wordlist 1, \
>   $(if
> $(GCC_TEST_PARALLEL_SLOTS),$(GCC_TEST_PARALLEL_SLOTS),128), \
> - $(check_p_numbers)))
> + $(one_to_)))

Thanks, If it works I'm happy, I can rebase my other patches to use this.

Thank you!

Regards,
Tamar

> 
>  # For parallelized check-% targets, this decides whether parallelization  # 
> is
> desirable (if -jN is used).  If desirable, recursive make is run with
> 
> 
>   Jakub



Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 03:22:11PM +, Tamar Christina wrote:
> > We require GNU make, so perhaps we could use something like $(wordlist
> > 1,$(NUM_MATCH_SPLITS),$(check_p_numbers))
> > instead of
> > $(shell seq 1 $(NUM_MATCH_SPLITS))
> > provided we move the check_p_numbers definition earlier (or perhaps bettter
> > rename it to something more generic, so that it is clear that is a variable
> > holding numbers from 1 to .
> 
> I'm currently testing
> 
> NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@
> -MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
> +MATCH_SPLITS_SEQ = $(shell echo {1..$(NUM_MATCH_SPLITS)})
> 
> Which seems to work since it looks like we require an sh compatible shell.
> 
> Question is this right? From the existing

AIX /bin/sh certainly doesn't handle that.

But what do I know about AIX...

This seems to work and we use it already in the Makefile.
If something else works portably, we could change both spots...

2023-05-05  Jakub Jelinek  

* Makefile.in (check_p_numbers): Rename to one_to_, move
earlier with helper variables also renamed.
(MATCH_SPLUT_SEQ): Use $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_))
instead of $(shell seq 1 $(NUM_MATCH_SPLITS)).
(check_p_subdirs): Use $(one_to_) instead of $(check_p_numbers).

--- gcc/Makefile.in.jj  2023-05-05 16:02:37.180575333 +0200
+++ gcc/Makefile.in 2023-05-05 17:20:27.923251821 +0200
@@ -214,9 +214,19 @@ rtl-ssa-warn = $(STRICT_WARN)
 GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if 
$(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) 
$($@-warn)
 GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
 
+# 1 2 3 ... 
+one_to__0:=1 2 3 4 5 6 7 8 9
+one_to__1:=0 $(one_to__0)
+one_to__2:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__1)))
+one_to__3:=$(addprefix 0,$(one_to__1)) $(one_to__2)
+one_to__4:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__3)))
+one_to__5:=$(addprefix 0,$(one_to__3)) $(one_to__4)
+one_to__6:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__5)))
+one_to_:=$(one_to__0) $(one_to__2) $(one_to__4) 
$(one_to__6)
+
 # The number of splits to be made for the match.pd files.
 NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@
-MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
+MATCH_SPLITS_SEQ = $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_))
 GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc, $(MATCH_SPLITS_SEQ))
 GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
 GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, 
$(MATCH_SPLITS_SEQ))
@@ -4234,18 +4244,10 @@ $(patsubst %,%-subtargets,$(lang_checks)
 check_p_tool=$(firstword $(subst _, ,$*))
 check_p_count=$(check_$(check_p_tool)_parallelize)
 check_p_subno=$(word 2,$(subst _, ,$*))
-check_p_numbers0:=1 2 3 4 5 6 7 8 9
-check_p_numbers1:=0 $(check_p_numbers0)
-check_p_numbers2:=$(foreach i,$(check_p_numbers0),$(addprefix 
$(i),$(check_p_numbers1)))
-check_p_numbers3:=$(addprefix 0,$(check_p_numbers1)) $(check_p_numbers2)
-check_p_numbers4:=$(foreach i,$(check_p_numbers0),$(addprefix 
$(i),$(check_p_numbers3)))
-check_p_numbers5:=$(addprefix 0,$(check_p_numbers3)) $(check_p_numbers4)
-check_p_numbers6:=$(foreach i,$(check_p_numbers0),$(addprefix 
$(i),$(check_p_numbers5)))
-check_p_numbers:=$(check_p_numbers0) $(check_p_numbers2) $(check_p_numbers4) 
$(check_p_numbers6)
 check_p_subdir=$(subst _,,$*)
 check_p_subdirs=$(wordlist 1,$(check_p_count),$(wordlist 1, \
$(if 
$(GCC_TEST_PARALLEL_SLOTS),$(GCC_TEST_PARALLEL_SLOTS),128), \
-   $(check_p_numbers)))
+   $(one_to_)))
 
 # For parallelized check-% targets, this decides whether parallelization
 # is desirable (if -jN is used).  If desirable, recursive make is run with


Jakub



RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message-
> From: Jakub Jelinek 
> Sent: Friday, May 5, 2023 4:18 PM
> To: Jeff Law 
> Cc: David Edelsohn ; Tamar Christina
> ; GCC Patches 
> Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> On Fri, May 05, 2023 at 09:04:16AM -0600, Jeff Law via Gcc-patches wrote:
> > On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote:
> > > This patch has broken GCC bootstrap on AIX.  It appears to rely
> > > upon, or complain about, the command "seq":
> > >
> > > /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
> > > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
> > > -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
> > > -Wmissing-format-attribute -Wconditionally-supported
> > > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
> > > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
> > > -DGENERATOR_FILE -static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-
> bmaxdata:0x4000 -o build/genmatch \
> > >  build/genmatch.o
> > > ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
> > > build/errors.o build/vec.o build/hash-table.o build/sort.o
> > > ../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
> > > /usr/bin/bash: seq: command not found
> > > /usr/bin/bash: seq: command not found build/genmatch --gimple \
> > >  --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
> > >  /nasfarm/edelsohn/src/src/gcc/match.pd
> > >
> > > All of the match files are dumped to stdout.
> > Sigh.  So the question is do we make seq a requirement or do we
> > implement an alternate to get the sequence or implement a fallback.
> 
> We require GNU make, so perhaps we could use something like $(wordlist
> 1,$(NUM_MATCH_SPLITS),$(check_p_numbers))
> instead of
> $(shell seq 1 $(NUM_MATCH_SPLITS))
> provided we move the check_p_numbers definition earlier (or perhaps bettter
> rename it to something more generic, so that it is clear that is a variable
> holding numbers from 1 to .

I'm currently testing

NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@
-MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
+MATCH_SPLITS_SEQ = $(shell echo {1..$(NUM_MATCH_SPLITS)})

Which seems to work since it looks like we require an sh compatible shell.

Question is this right? From the existing

$(foreach header_var,$(shell sed < Makefile -n -e 's/^\([A-Z0-9_]*_H\)[ 
]*=.*/\1/p'),echo $(header_var)=$(shell echo 
$($(header_var):$(srcdir)/%=.../%) | sed -e 's~\.\.\./config/~config/~' -e 
's~\.\.\./common/config/~common/config/~' -e 's~\.\.\.[^]*/~~g') >> 
tmp-header-vars;)

Rule this seems to be correct.

Thanks,
Tamar

> 
>   Jakub



Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 09:04:16AM -0600, Jeff Law via Gcc-patches wrote:
> On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote:
> > This patch has broken GCC bootstrap on AIX.  It appears to rely upon, or
> > complain about, the command "seq":
> > 
> > /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
> > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
> > -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
> > -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual
> > -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
> > -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++
> > -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o build/genmatch \
> >  build/genmatch.o ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
> > build/errors.o build/vec.o build/hash-table.o build/sort.o
> > ../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
> > /usr/bin/bash: seq: command not found
> > /usr/bin/bash: seq: command not found
> > build/genmatch --gimple \
> >  --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
> >  /nasfarm/edelsohn/src/src/gcc/match.pd
> > 
> > All of the match files are dumped to stdout.
> Sigh.  So the question is do we make seq a requirement or do we implement an
> alternate to get the sequence or implement a fallback.

We require GNU make, so perhaps we could use something like
$(wordlist 1,$(NUM_MATCH_SPLITS),$(check_p_numbers))
instead of
$(shell seq 1 $(NUM_MATCH_SPLITS))
provided we move the check_p_numbers definition earlier (or perhaps bettter 
rename
it to something more generic, so that it is clear that is a variable holding
numbers from 1 to .

Jakub



Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches




On 5/5/23 09:08, Tamar Christina wrote:

-Original Message-
From: Jeff Law 
Sent: Friday, May 5, 2023 4:04 PM
To: David Edelsohn ; Tamar Christina

Cc: GCC Patches 
Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
configurable.



On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote:

This patch has broken GCC bootstrap on AIX.  It appears to rely upon,
or complain about, the command "seq":

/nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
-Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -

DGENERATOR_FILE

-static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o

build/genmatch \

  build/genmatch.o ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
build/errors.o build/vec.o build/hash-table.o build/sort.o
../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
/usr/bin/bash: seq: command not found
/usr/bin/bash: seq: command not found
build/genmatch --gimple \
  --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
  /nasfarm/edelsohn/src/src/gcc/match.pd

All of the match files are dumped to stdout.

Sigh.  So the question is do we make seq a requirement or do we implement an
alternate to get the sequence or implement a fallback.

jeff


I'm looking for an alternate sequence now.

If I don't find one in a bit, since Monday is a bank holiday for the UK I can 
temporarily
Ignore the configure flag by defining

MATCH_SPLITS_SEQ = 1 2 3 4 5 6 7 8 9 10

Would that be ok as a temporary fix if I don't find anything else by EOD? But 
hoping to find another way that doesn't rely on coreutils.

Yea, that would be a fine workaround while we sort this out.
jeff


RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message-
> From: Jeff Law 
> Sent: Friday, May 5, 2023 4:04 PM
> To: David Edelsohn ; Tamar Christina
> 
> Cc: GCC Patches 
> Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> 
> 
> On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote:
> > This patch has broken GCC bootstrap on AIX.  It appears to rely upon,
> > or complain about, the command "seq":
> >
> > /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
> > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
> > -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
> > -Wmissing-format-attribute -Wconditionally-supported
> > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
> > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -
> DGENERATOR_FILE
> > -static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o
> build/genmatch \
> >  build/genmatch.o ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
> > build/errors.o build/vec.o build/hash-table.o build/sort.o
> > ../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
> > /usr/bin/bash: seq: command not found
> > /usr/bin/bash: seq: command not found
> > build/genmatch --gimple \
> >  --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
> >  /nasfarm/edelsohn/src/src/gcc/match.pd
> >
> > All of the match files are dumped to stdout.
> Sigh.  So the question is do we make seq a requirement or do we implement an
> alternate to get the sequence or implement a fallback.
> 
> jeff

I'm looking for an alternate sequence now.

If I don't find one in a bit, since Monday is a bank holiday for the UK I can 
temporarily
Ignore the configure flag by defining

MATCH_SPLITS_SEQ = 1 2 3 4 5 6 7 8 9 10

Would that be ok as a temporary fix if I don't find anything else by EOD? But 
hoping to find another way that doesn't rely on coreutils.

Cheers,
Tamar


Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches




On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote:

This patch has broken GCC bootstrap on AIX.  It appears to rely upon, or
complain about, the command "seq":

/nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
-Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++
-static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o build/genmatch \
 build/genmatch.o ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
build/errors.o build/vec.o build/hash-table.o build/sort.o
../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
/usr/bin/bash: seq: command not found
/usr/bin/bash: seq: command not found
build/genmatch --gimple \
 --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
 /nasfarm/edelsohn/src/src/gcc/match.pd

All of the match files are dumped to stdout.
Sigh.  So the question is do we make seq a requirement or do we 
implement an alternate to get the sequence or implement a fallback.


jeff


Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
This patch has broken GCC bootstrap on AIX.  It appears to rely upon, or
complain about, the command "seq":

/nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11   -g -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
-Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -static-libstdc++
-static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o build/genmatch \
build/genmatch.o ../build-powerpc-ibm-aix7.2.5.0/libcpp/libcpp.a
build/errors.o build/vec.o build/hash-table.o build/sort.o
../build-powerpc-ibm-aix7.2.5.0/libiberty/libiberty.a
/usr/bin/bash: seq: command not found
/usr/bin/bash: seq: command not found
build/genmatch --gimple \
--header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \
/nasfarm/edelsohn/src/src/gcc/match.pd

All of the match files are dumped to stdout.

Thanks, David


RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
>  This looks pretty reasonable to me.  Are there any patches left in
>  this series that need review?  I'm very much looking forward to
>  build time provements related to this patch, particularly for
>  targets that I bootstrap with qemu emulation -- we take multiple
>  hours to build gimple-match and the ability to parallelize those
>  component
> >> builds should be a significant win.
> >>>
> >>> Hi,
> >>>
> >>> No this is the last one, Richi already approved the rest but he
> >>> didn't feel he had enough knowledge about the build system to say if
> >>> this code was portable enough.
> >>
> >> I'm looking forward to this going as well for improved bootstrap
> >> times, thanks for working on this!
> >>
> >>>
> >>> So just waiting on this one and can commit the series.
> >>
> >> Can we treat Jeff's LGTM above as an ok given his global reviewer position?
> >
> > Ah I didn't treat it as such as it wasn't in reply to the "ok for
> > master" part. But perhaps I misunderstood.  In case it wasn't, this is
> > also a PING for the *.in files maintainers.
> My message was a fairly ambiguous.   I just gave it another once over
> and I'll give an explicit OK for the trunk.
> 

Merci!

I'll go to the next bottleneck then.

Thanks!
Tamar

> Jeff


Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-04 Thread Jeff Law via Gcc-patches




On 5/4/23 03:56, Tamar Christina wrote:

-Original Message-
From: Kyrylo Tkachov 
Sent: Wednesday, May 3, 2023 4:19 PM
To: Tamar Christina ; Jeff Law
; gcc-patches@gcc.gnu.org
Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
Subject: RE: [PATCH 5/5] match.pd: Use splits in makefile and make
configurable.




-Original Message-
From: Gcc-patches  On Behalf Of Tamar
Christina via Gcc-patches
Sent: Tuesday, May 2, 2023 8:08 AM
To: Jeff Law ; gcc-patches@gcc.gnu.org
Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
Subject: RE: [PATCH 5/5] match.pd: Use splits in makefile and make
configurable.


-Original Message-
From: Jeff Law 
Sent: Sunday, April 30, 2023 8:46 PM
To: Tamar Christina ;
gcc-patches@gcc.gnu.org
Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
configurable.



On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote:

Hi All,

This updates the build system to split up match.pd files into chunks of

10.

This also introduces a new flag --with-matchpd-partitions which
can be used to change the number of partitions.

For the analysis of why 10 please look at the previous patch in the series.

Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/ChangeLog:

PR bootstrap/84402
* Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
(OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
(s-match): Split into s-generic-match and s-gimple-match.
* configure.ac (with-matchpd-partitions,
DEFAULT_MATCHPD_PARTITIONS): New.
* configure: Regenerate.

This looks pretty reasonable to me.  Are there any patches left in
this series that need review?  I'm very much looking forward to
build time provements related to this patch, particularly for
targets that I bootstrap with qemu emulation -- we take multiple
hours to build gimple-match and the ability to parallelize those component

builds should be a significant win.


Hi,

No this is the last one, Richi already approved the rest but he didn't
feel he had enough knowledge about the build system to say if this
code was portable enough.


I'm looking forward to this going as well for improved bootstrap times, thanks
for working on this!



So just waiting on this one and can commit the series.


Can we treat Jeff's LGTM above as an ok given his global reviewer position?


Ah I didn't treat it as such as it wasn't in reply to the "ok for master" part. 
But
perhaps I misunderstood.  In case it wasn't, this is also a PING for the *.in 
files
maintainers.
My message was a fairly ambiguous.   I just gave it another once over 
and I'll give an explicit OK for the trunk.


Jeff


RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-04 Thread Tamar Christina via Gcc-patches
> -Original Message-
> From: Kyrylo Tkachov 
> Sent: Wednesday, May 3, 2023 4:19 PM
> To: Tamar Christina ; Jeff Law
> ; gcc-patches@gcc.gnu.org
> Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> Subject: RE: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> 
> 
> > -Original Message-
> > From: Gcc-patches  > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Tamar
> > Christina via Gcc-patches
> > Sent: Tuesday, May 2, 2023 8:08 AM
> > To: Jeff Law ; gcc-patches@gcc.gnu.org
> > Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> > aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> > Subject: RE: [PATCH 5/5] match.pd: Use splits in makefile and make
> > configurable.
> >
> > > -Original Message-
> > > From: Jeff Law 
> > > Sent: Sunday, April 30, 2023 8:46 PM
> > > To: Tamar Christina ;
> > > gcc-patches@gcc.gnu.org
> > > Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> > > aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> > > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> > > configurable.
> > >
> > >
> > >
> > > On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote:
> > > > Hi All,
> > > >
> > > > This updates the build system to split up match.pd files into chunks of
> 10.
> > > > This also introduces a new flag --with-matchpd-partitions which
> > > > can be used to change the number of partitions.
> > > >
> > > > For the analysis of why 10 please look at the previous patch in the 
> > > > series.
> > > >
> > > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
> > > >
> > > > Ok for master?
> > > >
> > > > Thanks,
> > > > Tamar
> > > >
> > > > gcc/ChangeLog:
> > > >
> > > > PR bootstrap/84402
> > > > * Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
> > > > GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
> > > > GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
> > > > (OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
> > > > (s-match): Split into s-generic-match and s-gimple-match.
> > > > * configure.ac (with-matchpd-partitions,
> > > > DEFAULT_MATCHPD_PARTITIONS): New.
> > > > * configure: Regenerate.
> > > This looks pretty reasonable to me.  Are there any patches left in
> > > this series that need review?  I'm very much looking forward to
> > > build time provements related to this patch, particularly for
> > > targets that I bootstrap with qemu emulation -- we take multiple
> > > hours to build gimple-match and the ability to parallelize those component
> builds should be a significant win.
> >
> > Hi,
> >
> > No this is the last one, Richi already approved the rest but he didn't
> > feel he had enough knowledge about the build system to say if this
> > code was portable enough.
> 
> I'm looking forward to this going as well for improved bootstrap times, thanks
> for working on this!
> 
> >
> > So just waiting on this one and can commit the series.
> 
> Can we treat Jeff's LGTM above as an ok given his global reviewer position?

Ah I didn't treat it as such as it wasn't in reply to the "ok for master" part. 
But
perhaps I misunderstood.  In case it wasn't, this is also a PING for the *.in 
files
maintainers.

Regards,
Tamar

> Thanks,
> Kyrill
> 
> >
> > Cheers,
> > Tamar
> > >
> > > jeff


RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-03 Thread Kyrylo Tkachov via Gcc-patches


> -Original Message-
> From: Gcc-patches  bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Tamar
> Christina via Gcc-patches
> Sent: Tuesday, May 2, 2023 8:08 AM
> To: Jeff Law ; gcc-patches@gcc.gnu.org
> Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> Subject: RE: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> > -Original Message-
> > From: Jeff Law 
> > Sent: Sunday, April 30, 2023 8:46 PM
> > To: Tamar Christina ; gcc-patches@gcc.gnu.org
> > Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> > aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> > configurable.
> >
> >
> >
> > On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote:
> > > Hi All,
> > >
> > > This updates the build system to split up match.pd files into chunks of 
> > > 10.
> > > This also introduces a new flag --with-matchpd-partitions which can be
> > > used to change the number of partitions.
> > >
> > > For the analysis of why 10 please look at the previous patch in the 
> > > series.
> > >
> > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
> > >
> > > Ok for master?
> > >
> > > Thanks,
> > > Tamar
> > >
> > > gcc/ChangeLog:
> > >
> > >   PR bootstrap/84402
> > >   * Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
> > >   GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
> > >   GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
> > >   (OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
> > >   (s-match): Split into s-generic-match and s-gimple-match.
> > >   * configure.ac (with-matchpd-partitions,
> > >   DEFAULT_MATCHPD_PARTITIONS): New.
> > >   * configure: Regenerate.
> > This looks pretty reasonable to me.  Are there any patches left in this 
> > series
> > that need review?  I'm very much looking forward to build time provements
> > related to this patch, particularly for targets that I bootstrap with qemu
> > emulation -- we take multiple hours to build gimple-match and the ability to
> > parallelize those component builds should be a significant win.
> 
> Hi,
> 
> No this is the last one, Richi already approved the rest but he didn't feel he
> had
> enough knowledge about the build system to say if this code was portable
> enough.

I'm looking forward to this going as well for improved bootstrap times, thanks 
for working on this!

> 
> So just waiting on this one and can commit the series.

Can we treat Jeff's LGTM above as an ok given his global reviewer position?
Thanks,
Kyrill

> 
> Cheers,
> Tamar
> >
> > jeff


RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-02 Thread Tamar Christina via Gcc-patches
> -Original Message-
> From: Jeff Law 
> Sent: Sunday, April 30, 2023 8:46 PM
> To: Tamar Christina ; gcc-patches@gcc.gnu.org
> Cc: nd ; bonz...@gnu.org; nero...@gcc.gnu.org;
> aol...@gcc.gnu.org; ralf.wildenh...@gmx.de
> Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make
> configurable.
> 
> 
> 
> On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote:
> > Hi All,
> >
> > This updates the build system to split up match.pd files into chunks of 10.
> > This also introduces a new flag --with-matchpd-partitions which can be
> > used to change the number of partitions.
> >
> > For the analysis of why 10 please look at the previous patch in the series.
> >
> > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
> >
> > Ok for master?
> >
> > Thanks,
> > Tamar
> >
> > gcc/ChangeLog:
> >
> > PR bootstrap/84402
> > * Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
> > GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
> > GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
> > (OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
> > (s-match): Split into s-generic-match and s-gimple-match.
> > * configure.ac (with-matchpd-partitions,
> > DEFAULT_MATCHPD_PARTITIONS): New.
> > * configure: Regenerate.
> This looks pretty reasonable to me.  Are there any patches left in this series
> that need review?  I'm very much looking forward to build time provements
> related to this patch, particularly for targets that I bootstrap with qemu
> emulation -- we take multiple hours to build gimple-match and the ability to
> parallelize those component builds should be a significant win.

Hi,

No this is the last one, Richi already approved the rest but he didn't feel he 
had
enough knowledge about the build system to say if this code was portable enough.

So just waiting on this one and can commit the series.

Cheers,
Tamar
> 
> jeff


Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-04-30 Thread Jeff Law via Gcc-patches




On 4/28/23 04:44, Tamar Christina via Gcc-patches wrote:

Hi All,

This updates the build system to split up match.pd files into chunks of 10.
This also introduces a new flag --with-matchpd-partitions which can be used to
change the number of partitions.

For the analysis of why 10 please look at the previous patch in the series.

Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/ChangeLog:

PR bootstrap/84402
* Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
(OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
(s-match): Split into s-generic-match and s-gimple-match.
* configure.ac (with-matchpd-partitions,
DEFAULT_MATCHPD_PARTITIONS): New.
* configure: Regenerate.
This looks pretty reasonable to me.  Are there any patches left in this 
series that need review?  I'm very much looking forward to build time 
provements related to this patch, particularly for targets that I 
bootstrap with qemu emulation -- we take multiple hours to build 
gimple-match and the ability to parallelize those component builds 
should be a significant win.


jeff


[PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-04-28 Thread Tamar Christina via Gcc-patches
Hi All,

This updates the build system to split up match.pd files into chunks of 10.
This also introduces a new flag --with-matchpd-partitions which can be used to
change the number of partitions.

For the analysis of why 10 please look at the previous patch in the series.

Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/ChangeLog:

PR bootstrap/84402
* Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ,
GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O,
GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New.
(OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them.
(s-match): Split into s-generic-match and s-gimple-match.
* configure.ac (with-matchpd-partitions,
DEFAULT_MATCHPD_PARTITIONS): New.
* configure: Regenerate.

--- inline copy of patch -- 
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 
70559a014c0e32d8d825766e0c1516fc2ee05421..f3343eea3339e9dc054e83cfb899799c7d784963
 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -214,6 +214,14 @@ rtl-ssa-warn = $(STRICT_WARN)
 GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if 
$(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) 
$($@-warn)
 GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
 
+# The number of splits to be made for the match.pd files.
+NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@
+MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS))
+GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc, $(MATCH_SPLITS_SEQ))
+GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
+GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, 
$(MATCH_SPLITS_SEQ))
+GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ))
+
 # These files are to have specific diagnostics suppressed, or are not to
 # be subject to -Werror:
 # flex output may yield harmless "no previous prototype" warnings
@@ -222,9 +230,8 @@ gengtype-lex.o-warn = -Wno-error
 libgcov-util.o-warn = -Wno-error
 libgcov-driver-tool.o-warn = -Wno-error
 libgcov-merge-tool.o-warn = -Wno-error
-gimple-match.o-warn = -Wno-unused
+gimple-match-head.o-warn = -Wno-unused
 gimple-match-exports.o-warn = -Wno-unused
-generic-match.o-warn = -Wno-unused
 dfp.o-warn = -Wno-strict-aliasing
 
 # All warnings have to be shut off in stage1 if the compiler used then
@@ -1310,9 +1317,9 @@ ANALYZER_OBJS = \
 # will build them sooner, because they are large and otherwise tend to be
 # the last objects to finish building.
 OBJS = \
-   gimple-match.o \
+   $(GIMPLE_MATCH_PD_SEQ_O) \
gimple-match-exports.o \
-   generic-match.o \
+   $(GENERIC_MATCH_PD_SEQ_O) \
insn-attrtab.o \
insn-automata.o \
insn-dfatab.o \
@@ -1805,7 +1812,8 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h 
insn-codes.h \
  insn-output.cc insn-recog.cc insn-emit.cc insn-extract.cc insn-peep.cc \
  insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
  insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc 
insn-constants.h \
- tm-preds.h tm-constrs.h checksum-options gimple-match.cc generic-match.cc \
+ tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
+ $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \
  tree-check.h min-insn-modes.cc insn-modes.cc insn-modes.h insn-modes-inline.h 
\
  genrtl.h gt-*.h gtype-*.h gtype-desc.cc gtyp-input.list \
  case-cfn-macros.h cfn-operators.pd \
@@ -2420,7 +2428,8 @@ $(common_out_object_file): $(common_out_file)
 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
   insn-emit.cc insn-recog.cc insn-extract.cc insn-output.cc insn-peep.cc \
   insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
-  insn-latencytab.cc insn-preds.cc gimple-match.cc generic-match.cc \
+  insn-latencytab.cc insn-preds.cc $(GIMPLE_MATCH_PD_SEQ_SRC) \
+  $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \
   insn-target-def.h
 
 # Dependencies for the md file.  The first time through, we just assume
@@ -2663,19 +2672,36 @@ s-tm-texi: build/genhooks$(build_exeext) 
$(srcdir)/doc/tm.texi.in
  false; \
fi
 
-gimple-match.cc: s-match gimple-match-head.cc gimple-match-exports.cc ; @true
-generic-match.cc: s-match generic-match-head.cc ; @true
-
-s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
-   $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \
-   > tmp-gimple-match.cc
-   $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \
-   > tmp-generic-match.cc
-   $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match.cc \
-   gimple-match.cc
-   $(SHELL) $(srcdir)/../move-if-change tmp-generic-match.cc \
-   generic-match.cc
-   $(STAMP) s-match