diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-05-23 23:40:10 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-08-07 09:57:51 -0500 |
commit | 93cf7fc8b05fe3003b6f16b766622544cdf3830b (patch) | |
tree | 594b1c2e06144b9e0b0dae1310399b5935ddc5ff /system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch | |
parent | d15fa95546e4f4200700750986fb5e249d9bfbe1 (diff) | |
download | packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.gz packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.bz2 packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.tar.xz packages-93cf7fc8b05fe3003b6f16b766622544cdf3830b.zip |
system/gcc: Update to 13.3.0
0012-static-pie and 201-ada were forward-ported by my own paws.
Three digit 0xx underscore patches are from Gentoo. This is also the
source of the insn-split and match-split patches, which significantly
increase performance on build. They are also the source of the new
configure option --with-matchpd-partitions. On systems with very many
cores/threads, a number higher than 32 would probably perform even
better, but 32 should give decent perf on 8+ threads, and runs quite
nicely on the 64-thread Talos II I ran the testbuild on.
202 is from Void. The 300s are originally written by me.
The Ada patch now includes an improvement to use posix_openpt instead
of getpt, which fixes link errors later on.
We also now use STAGE1_CFLAGS and BOOT_CFLAGS to improve build times.
Improvement was clocked from 40m to 32m (-8m, or 20%) on gwyn.
The patch for Go name mangling is needed to build packages that use
reflect2, which includes user/gitlab-runner.
Diffstat (limited to 'system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch')
-rw-r--r-- | system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch b/system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch new file mode 100644 index 000000000..e084c4c77 --- /dev/null +++ b/system/gcc/078_all_match.pd-CSE-the-dump-output-check.patch @@ -0,0 +1,70 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 + +From 2d83fafb3f263544be09bf7dbde036e4a84f6d7c Mon Sep 17 00:00:00 2001 +From: Tamar Christina <tamar.christina@arm.com> +Date: Fri, 5 May 2023 13:36:43 +0100 +Subject: [PATCH 03/15] match.pd: CSE the dump output check. + +This is a small improvement in QoL codegen for match.pd to save time not +re-evaluating the condition for printing debug information in every function. + +There is a small but consistent runtime and compile time win here. The runtime +win comes from not having to do the condition over again, and on Arm plaforms +we now use the new test-and-branch support for booleans to only have a single +instruction here. + +gcc/ChangeLog: + + PR bootstrap/84402 + * genmatch.cc (decision_tree::gen, write_predicate): Generate new + debug_dump var. + (dt_simplify::gen_1): Use it. + +(cherry picked from commit c0ce29bc1ce329001b6c02bb3d34bcbb086e1b72) +--- + gcc/genmatch.cc | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc +index 45e49c790b6d..a17ef8a23ed5 100644 +--- a/gcc/genmatch.cc ++++ b/gcc/genmatch.cc +@@ -3433,7 +3433,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) + needs_label = true; + } + +- fprintf_indent (f, indent, "if (UNLIKELY (dump_file && (dump_flags & TDF_FOLDING))) " ++ fprintf_indent (f, indent, "if (UNLIKELY (debug_dump)) " + "fprintf (dump_file, \"%s ", + s->kind == simplify::SIMPLIFY + ? "Applying pattern" : "Matching expression"); +@@ -3894,6 +3894,8 @@ decision_tree::gen (FILE *f, bool gimple) + } + + fprintf (f, ")\n{\n"); ++ fprintf_indent (f, 2, "const bool debug_dump = " ++ "dump_file && (dump_flags & TDF_FOLDING);\n"); + s->s->gen_1 (f, 2, gimple, s->s->s->result); + if (gimple) + fprintf (f, " return false;\n"); +@@ -3939,6 +3941,8 @@ decision_tree::gen (FILE *f, bool gimple) + fprintf (f, ", tree _p%d", i); + fprintf (f, ")\n"); + fprintf (f, "{\n"); ++ fprintf_indent (f, 2, "const bool debug_dump = " ++ "dump_file && (dump_flags & TDF_FOLDING);\n"); + dop->gen_kids (f, 2, gimple, 0); + if (gimple) + fprintf (f, " return false;\n"); +@@ -4048,6 +4052,8 @@ write_predicate (FILE *f, predicate_id *p, decision_tree &dt, bool gimple) + gimple ? ", tree (*valueize)(tree) ATTRIBUTE_UNUSED" : ""); + /* Conveniently make 'type' available. */ + fprintf_indent (f, 2, "const tree type = TREE_TYPE (t);\n"); ++ fprintf_indent (f, 2, "const bool debug_dump = " ++ "dump_file && (dump_flags & TDF_FOLDING);\n"); + + if (!gimple) + fprintf_indent (f, 2, "if (TREE_SIDE_EFFECTS (t)) return false;\n"); +-- +2.44.0 + |