public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gcc] rhel-f41-base: 14.1.1-2
@ 2026-06-29 12:30 Marek Polacek
0 siblings, 0 replies; 2+ messages in thread
From: Marek Polacek @ 2026-06-29 12:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gcc
Branch : rhel-f41-base
Commit : 150f0ee9153fa1e1095372a69025e27124ac51b6
Author : Marek Polacek <polacek@redhat.com>
Date : 2024-05-17T10:04:53-04:00
Stats : +8/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/150f0ee9153fa1e1095372a69025e27124ac51b6?branch=rhel-f41-base
Log:
14.1.1-2
---
diff --git a/gcc14-pr101523.patch b/gcc14-pr101523.patch
index 618f97e..7ca8467 100644
--- a/gcc14-pr101523.patch
+++ b/gcc14-pr101523.patch
@@ -41,6 +41,14 @@ With the limit in place this patch doesn't affect common code.
/* Number of attempts to combine instructions in this function. */
static int combine_attempts;
+@@ -1127,6 +1132,7 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
+ return false;
+
+ combine_attempts = 0;
++ combine_unchanged = 0;
+ combine_merges = 0;
+ combine_extras = 0;
+ combine_successes = 0;
@@ -4196,6 +4201,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
adjust_for_new_dest (i3);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* [rpms/gcc] rhel-f41-base: 14.1.1-2
@ 2026-06-29 12:30 Marek Polacek
0 siblings, 0 replies; 2+ messages in thread
From: Marek Polacek @ 2026-06-29 12:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gcc
Branch : rhel-f41-base
Commit : 7b746958a358bd7252d130f41b6a3d5893bf8736
Author : Marek Polacek <polacek@redhat.com>
Date : 2024-05-17T09:50:05-04:00
Stats : +74/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/7b746958a358bd7252d130f41b6a3d5893bf8736?branch=rhel-f41-base
Log:
14.1.1-2
---
diff --git a/gcc.spec b/gcc.spec
index d326248..0d6b4bd 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -4,7 +4,7 @@
%global gcc_major 14
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 1
+%global gcc_release 2
%global nvptx_tools_gitrev 9962793f41e016318dc5eca07ae602041cf526ff
%global newlib_cygwin_gitrev d45261f62a15f8abd94a1031020b9a9f455e4eed
%global _unpackaged_files_terminate_build 0
@@ -310,6 +310,7 @@ Patch8: gcc14-no-add-needed.patch
Patch9: gcc14-Wno-format-security.patch
Patch10: gcc14-rh1574936.patch
Patch11: gcc14-d-shared-libphobos.patch
+Patch12: gcc14-pr101523.patch
Patch50: isl-rh2155127.patch
@@ -910,6 +911,7 @@ so that there cannot be any synchronization problems.
%patch -P10 -p0 -b .rh1574936~
%endif
%patch -P11 -p0 -b .d-shared-libphobos~
+%patch -P12 -p1 -b .pr101523~
%patch -P50 -p0 -b .rh2155127~
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
@@ -3630,6 +3632,9 @@ end
%endif
%changelog
+* Thu May 16 2024 Marek Polacek <polacek@redhat.com> 14.1.1-2
+- fix a combinatorial explosion in combine (PR rtl-optimization/101523)
+
* Wed May 8 2024 Jakub Jelinek <jakub@redhat.com> 14.1.1-1
- update from releases/gcc-14 branch
- GCC 14.1.0 release
diff --git a/gcc14-pr101523.patch b/gcc14-pr101523.patch
new file mode 100644
index 0000000..618f97e
--- /dev/null
+++ b/gcc14-pr101523.patch
@@ -0,0 +1,68 @@
+Based on Richi's patch:
+<https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648725.html>
+~~
+The following avoids re-walking and re-combining the instructions
+between i2 and i3 when the pattern of i2 doesn't change.
+
+Bootstrap and regtest running ontop of a reversal of
+r14-9692-g839bc42772ba7a.
+
+It brings down memory use frmo 9GB to 400MB and compile-time from
+80s to 3.5s. r14-9692-g839bc42772ba7a does better in both metrics
+but has shown code generation regressions across acrchitectures.
+
+ PR rtl-optimization/101523
+ * combine.cc (try_combine): When the pattern of i2 doesn't
+ change do not re-start combining at i2 or an earlier insn which
+ had links or notes added.
+~~
+But, since the patch affects code generation (for instance,
+libstdc++-v3/src/c++17/floating_from_chars.o), we limit the bailing out
+only when I2 hasn't been changed 1000x. I've measured how many times
+at most is I2 unchanged during a bootstrap + regtest.
+x86: 134
+aarch64: 736 (gimple-match-1.cc)
+s390x: 635 (gimple-match-*)
+ppc64le: 620 (gimple-match-*)
+while certain pathological testcases trigger it more than 10,000 times.
+With the limit in place this patch doesn't affect common code.
+
+--- a/gcc/combine.cc
++++ b/gcc/combine.cc
+@@ -92,6 +92,11 @@ along with GCC; see the file COPYING3. If not see
+ #include "function-abi.h"
+ #include "rtlanal.h"
+
++/* Number of times I2 didn't change in try_combine. Used to prevent a
++ combinatorial explosion. */
++
++static int combine_unchanged;
++
+ /* Number of attempts to combine instructions in this function. */
+
+ static int combine_attempts;
+@@ -4196,6 +4201,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
+ adjust_for_new_dest (i3);
+ }
+
++ bool i2_unchanged = false;
++ if (rtx_equal_p (newi2pat, PATTERN (i2)))
++ i2_unchanged = true;
++
+ /* We now know that we can do this combination. Merge the insns and
+ update the status of registers and LOG_LINKS. */
+
+@@ -4762,6 +4771,13 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
+ combine_successes++;
+ undo_commit ();
+
++ if (i2_unchanged)
++ {
++ if (combine_unchanged == 1000)
++ return i3;
++ ++combine_unchanged;
++ }
++
+ rtx_insn *ret = newi2pat ? i2 : i3;
+ if (added_links_insn && DF_INSN_LUID (added_links_insn) < DF_INSN_LUID (ret))
+ ret = added_links_insn;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-29 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 12:30 [rpms/gcc] rhel-f41-base: 14.1.1-2 Marek Polacek
-- strict thread matches above, loose matches on Subject: below --
2026-06-29 12:30 Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox