<[email protected]> writes:
> [...]
> @@ -12995,6 +13013,56 @@ target_gtfiles=
> # Collect target-machine-specific information.
> . ${srcdir}/config.gcc || exit 1
>
> +# Use the target default unless the user specified an option.
> +if test "$md_generator_partitions_set" = no; then
> + md_generator_partitions=$default_md_generator_partitions
> +fi
> +
> +case "$md_generator_partitions" in
> + '' | *[!0-9:]* | :* | *: | *:*:*:*)
> + DEFAULT_INSNATTRTAB_PARTITIONS=
> + ;;
> + *:*:*)
> + IFS=: read -r DEFAULT_INSNEMIT_PARTITIONS DEFAULT_INSNRECOG_PARTITIONS \
> + DEFAULT_INSNATTRTAB_PARTITIONS <<EOF
> +$md_generator_partitions
> +EOF
> + ;;
> + *:*)
> + DEFAULT_INSNATTRTAB_PARTITIONS=
> + ;;
> + *)
> + DEFAULT_INSNEMIT_PARTITIONS=$md_generator_partitions
> + DEFAULT_INSNRECOG_PARTITIONS=$md_generator_partitions
> + DEFAULT_INSNATTRTAB_PARTITIONS=$md_generator_partitions
> + ;;
> +esac
Is there a particular reason for setting only DEFAULT_INSNATTRTAB_PARTITIONS
to empty? It's DEFAULT_INSNEMIT_PARTITIONS that would be processed first.
The '', [!0-9], :*, and *: seem redundant with the below. Perhaps it would
be worth making it:
case "$md_generator_partitions" in
*:*:*)
IFS=: read -r DEFAULT_INSNEMIT_PARTITIONS DEFAULT_INSNRECOG_PARTITIONS \
DEFAULT_INSNATTRTAB_PARTITIONS <<EOF
$md_generator_partitions
EOF
;;
*)
DEFAULT_INSNEMIT_PARTITIONS=$md_generator_partitions
DEFAULT_INSNRECOG_PARTITIONS=$md_generator_partitions
DEFAULT_INSNATTRTAB_PARTITIONS=$md_generator_partitions
;;
esac
so that we unconditionally set all three variables and leave the
code below to handle empty values, values containing colons,
or non-numerical values.
> +
> +for generator_partitions in \
> + "$DEFAULT_INSNEMIT_PARTITIONS" \
> + "$DEFAULT_INSNRECOG_PARTITIONS" \
> + "$DEFAULT_INSNATTRTAB_PARTITIONS"; do
> + case "$generator_partitions" in
> + '' | *[!0-9]*) generator_partitions= ;;
> + *)
> + while test "${generator_partitions#0}" != "$generator_partitions"; do
> + generator_partitions=${generator_partitions#0}
> + done
> + case "$generator_partitions" in
> + '' | ?????*) generator_partitions= ;;
> + esac
> + ;;
> + esac
> + if test -z "$generator_partitions"; then
> + as_fn_error $? "Invalid machine-description generator partition value
> $md_generator_partitions. Use N or E:R:A, with each number between 1 and
> 9999." "$LINENO" 5
> + fi
> +done
> [...]
> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> index dd06985a506..8426c49d5e2 100644
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -1967,6 +1967,17 @@ dependencies and thus with parallel make potentially
> link different
> compilers concurrently. If the argument is a positive integer, allow
> that number of concurrent link processes for the large binaries.
>
> +@item --with-md-generator-partitions=@var{num}
> +@itemx --with-md-generator-partitions=@var{counts}
> +Set the number of C++ source partitions produced by genemit, genrecog,
> +and genattrtab. A single @var{num} sets all three counts. The
I suppose the gen*s should be marked up using @command{}. Since this
is user-facing documentation, perhaps we should say "by the internal
build-time tools @command{genemit}, ..." or something. We should probably
also say that more files can help speed up parallel builds.
OK with those changes if you agree.
TBH, I'd also be happy with not documenting this at all.
I think that's the last of the unreviewed patches in this series.
Please let me know if I missed one.
Thanks,
Richard
> +@var{counts} form is
> +@code{@var{emit}:@var{recog}:@var{attrtab}}. Each count must be between
> +1 and 9999. The default is @code{6:6:1} for AArch64 and 10 for each
> +generator on other targets. A target can set a different default in
> +@file{config.gcc}. @option{--with-insnemit-partitions} is a deprecated
> +alias.
> +
> @item --enable-maintainer-mode
> The build rules that regenerate the Autoconf and Automake output files as
> well as the GCC master message catalog @file{gcc.pot} are normally