* [Bug c/97969] [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
@ 2020-11-24 15:24 ` pmiscml at gmail dot com
2020-11-24 15:33 ` pmiscml at gmail dot com
` (28 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2020-11-24 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #1 from Paul Sokolovsky <pmiscml at gmail dot com> ---
Created attachment 49620
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49620&action=edit
Preprocessed original source which caused the issue (js-parser.c from
JerryScript project)
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug c/97969] [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
2020-11-24 15:24 ` [Bug c/97969] " pmiscml at gmail dot com
@ 2020-11-24 15:33 ` pmiscml at gmail dot com
2020-11-24 15:43 ` [Bug c/97969] [9/10/11 Regression][ARM/Thumb] " ktkachov at gcc dot gnu.org
` (27 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2020-11-24 15:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #2 from Paul Sokolovsky <pmiscml at gmail dot com> ---
To confirm, GCC 9.3.1 from "gcc-arm-none-eabi-9-2020-q2-update" (as distributed
by Arm from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm)
also has this issue.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug c/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
2020-11-24 15:24 ` [Bug c/97969] " pmiscml at gmail dot com
2020-11-24 15:33 ` pmiscml at gmail dot com
@ 2020-11-24 15:43 ` ktkachov at gcc dot gnu.org
2020-11-25 8:17 ` [Bug target/97969] " rguenth at gcc dot gnu.org
` (26 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-24 15:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm
Status|UNCONFIRMED |NEW
Known to fail| |10.2.1, 11.0, 9.3.1
CC| |ktkachov at gcc dot gnu.org
Known to work| |8.4.1
Last reconfirmed| |2020-11-24
Summary|[ARM/Thumb] Certain combo |[9/10/11
|of codegen options leads to |Regression][ARM/Thumb]
|compilation infinite loop |Certain combo of codegen
|with growing memory use |options leads to
| |compilation infinite loop
| |with growing memory use
Keywords| |memory-hog
Ever confirmed|0 |1
--- Comment #3 from ktkachov at gcc dot gnu.org ---
Confirmed on the 9, 10, 11 branches. On GCC 8 it completes successfully.
Doesn't reproduce on aarch64, looks like it needs all of -mthumb
-fno-omit-frame-pointer -Os.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (2 preceding siblings ...)
2020-11-24 15:43 ` [Bug c/97969] [9/10/11 Regression][ARM/Thumb] " ktkachov at gcc dot gnu.org
@ 2020-11-25 8:17 ` rguenth at gcc dot gnu.org
2020-11-25 17:15 ` ktkachov at gcc dot gnu.org
` (25 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-25 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
Keywords| |compile-time-hog
Priority|P3 |P2
Target Milestone|--- |9.4
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (3 preceding siblings ...)
2020-11-25 8:17 ` [Bug target/97969] " rguenth at gcc dot gnu.org
@ 2020-11-25 17:15 ` ktkachov at gcc dot gnu.org
2020-11-27 12:25 ` pmiscml at gmail dot com
` (24 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-25 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at gcc dot gnu.org
--- Comment #4 from ktkachov at gcc dot gnu.org ---
This seems to go into a bad loop somewhere in LRA.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (4 preceding siblings ...)
2020-11-25 17:15 ` ktkachov at gcc dot gnu.org
@ 2020-11-27 12:25 ` pmiscml at gmail dot com
2020-11-27 17:32 ` ktkachov at gcc dot gnu.org
` (23 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2020-11-27 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #5 from Paul Sokolovsky <pmiscml at gmail dot com> ---
ktkachov@gcc.gnu.org:
Thanks for looking into this issue! Looking forward for the root cause to be
found. Given the minimized testcase which CReduce came to, my finger-in-the-sky
bet would be that it's a very fine case of data structure corruption, which
doesn't lead to segfault, but rather to infiniloop.
I'm saying that, because I tried to play with the minimized example myself, but
saw that most changes get rid of the issue. The only "simplifying" change I
could make which still leads to infiniloop is replace usage of the "h" enum
with "char" ("int" doesn't work). That makes declaration of the "h" enum
unused, and yet removal of it fixes the loop. That's why I say it looks like
very fine memory corruption, it's hard to imagine how unused enum declaration
can affect regalloc.
But then, I don't have experience with this stuff, and the setup is too
complicated for me to try. So again, thanks for looking into this.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (5 preceding siblings ...)
2020-11-27 12:25 ` pmiscml at gmail dot com
@ 2020-11-27 17:32 ` ktkachov at gcc dot gnu.org
2020-12-06 4:34 ` haoxintu at gmail dot com
` (22 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-27 17:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #6 from ktkachov at gcc dot gnu.org ---
Bisection shows it started with g:8d2d39587d941a40f25ea0144cceb677df115040
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (6 preceding siblings ...)
2020-11-27 17:32 ` ktkachov at gcc dot gnu.org
@ 2020-12-06 4:34 ` haoxintu at gmail dot com
2020-12-07 9:56 ` ktkachov at gcc dot gnu.org
` (21 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: haoxintu at gmail dot com @ 2020-12-06 4:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Haoxin Tu <haoxintu at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |haoxintu at gmail dot com
--- Comment #7 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to Paul Sokolovsky from comment #0)
Hi, Paul. May I ask how to reduce compile-time-hog/memory-hog test cases using
CReduce?
I know CReduce can be easily used to reduce crash/wrong-code test cases, but I
don't know how to minimize compile-time/memory ones. I will be very appreciated
if you can give me any tips. Thanks.
Best,
Haoxin
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (7 preceding siblings ...)
2020-12-06 4:34 ` haoxintu at gmail dot com
@ 2020-12-07 9:56 ` ktkachov at gcc dot gnu.org
2020-12-07 10:04 ` haoxintu at gmail dot com
` (20 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-12-07 9:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #8 from ktkachov at gcc dot gnu.org ---
(In reply to Haoxin Tu from comment #7)
> (In reply to Paul Sokolovsky from comment #0)
>
> Hi, Paul. May I ask how to reduce compile-time-hog/memory-hog test cases
> using CReduce?
> I know CReduce can be easily used to reduce crash/wrong-code test cases, but
> I don't know how to minimize compile-time/memory ones. I will be very
> appreciated if you can give me any tips. Thanks.
>
>
> Best,
> Haoxin
When I had to do it in the past I've used the 'ulimit' command in linux. That
allows you to kill a process if it exceeds a time limit (ulimit -t) or a memory
limit (ulimit -m). You can use it in the validation script to check for the
pathological behaviour
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (8 preceding siblings ...)
2020-12-07 9:56 ` ktkachov at gcc dot gnu.org
@ 2020-12-07 10:04 ` haoxintu at gmail dot com
2020-12-07 10:34 ` pmiscml at gmail dot com
` (19 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: haoxintu at gmail dot com @ 2020-12-07 10:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #9 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to ktkachov from comment #8)
> When I had to do it in the past I've used the 'ulimit' command in linux.
> That allows you to kill a process if it exceeds a time limit (ulimit -t) or
> a memory limit (ulimit -m). You can use it in the validation script to check
> for the pathological behaviour
Hi. Got you. Thank you so much!
Best,
Haoxin
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (9 preceding siblings ...)
2020-12-07 10:04 ` haoxintu at gmail dot com
@ 2020-12-07 10:34 ` pmiscml at gmail dot com
2020-12-07 10:38 ` pmiscml at gmail dot com
` (18 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2020-12-07 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #10 from Paul Sokolovsky <pmiscml at gmail dot com> ---
Created attachment 49693
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49693&action=edit
Script for CReduce
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (10 preceding siblings ...)
2020-12-07 10:34 ` pmiscml at gmail dot com
@ 2020-12-07 10:38 ` pmiscml at gmail dot com
2020-12-07 10:56 ` haoxintu at gmail dot com
` (17 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2020-12-07 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #11 from Paul Sokolovsky <pmiscml at gmail dot com> ---
In my case, I used the "timeout" command from GNU coreutils. I've attached the
actual script used for reference (uncleaned dirty stuff, sorry).
One thing to keep in mind (and which took me a couple of extra creduce runs) is
that when it times out, it's the "interesting case" in CReduce terms. And when
compilation succeeds *or* fails (e.g. because CReduce produced broken syntax),
it's "not interesting case". So, you literally need to test for the timeout
exit code vs anything else (be it 0 or 1), like the script shows.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (11 preceding siblings ...)
2020-12-07 10:38 ` pmiscml at gmail dot com
@ 2020-12-07 10:56 ` haoxintu at gmail dot com
2021-01-11 20:32 ` vmakarov at gcc dot gnu.org
` (16 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: haoxintu at gmail dot com @ 2020-12-07 10:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #12 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to Paul Sokolovsky from comment #11)
Awesome! I got your main idea here. Thank you very much, Paul!
Best,
Haoxin
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (12 preceding siblings ...)
2020-12-07 10:56 ` haoxintu at gmail dot com
@ 2021-01-11 20:32 ` vmakarov at gcc dot gnu.org
2021-01-12 8:31 ` wirkus at gcc dot gnu.org
` (15 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-01-11 20:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #13 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Thank you for reducing the test.
I've reproduced the problem and started working on it. I think the fix will be
ready on this week.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (13 preceding siblings ...)
2021-01-11 20:32 ` vmakarov at gcc dot gnu.org
@ 2021-01-12 8:31 ` wirkus at gcc dot gnu.org
2021-01-12 15:11 ` vmakarov at gcc dot gnu.org
` (14 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: wirkus at gcc dot gnu.org @ 2021-01-12 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #14 from Przemyslaw Wirkus <wirkus at gcc dot gnu.org> ---
Hi Vladimir,
I'm assigned to the issue and I'm working on it. I think I got the root cause.
I'm in the process of creating a patch after I complete few tests.
kind regards
Przemyslaw
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (14 preceding siblings ...)
2021-01-12 8:31 ` wirkus at gcc dot gnu.org
@ 2021-01-12 15:11 ` vmakarov at gcc dot gnu.org
2021-01-12 15:12 ` vmakarov at gcc dot gnu.org
` (13 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-01-12 15:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #15 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Created attachment 49955
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49955&action=edit
a patch fixing the PR
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (15 preceding siblings ...)
2021-01-12 15:11 ` vmakarov at gcc dot gnu.org
@ 2021-01-12 15:12 ` vmakarov at gcc dot gnu.org
2021-01-12 15:38 ` wirkus at gcc dot gnu.org
` (12 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-01-12 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #16 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Przemyslaw Wirkus from comment #14)
> Hi Vladimir,
>
> I'm assigned to the issue and I'm working on it. I think I got the root
> cause.
> I'm in the process of creating a patch after I complete few tests.
>
> kind regards
> Przemyslaw
Sorry, it was not clear for me that somebody was working on the patch. The bug
is actually severe and should be classified as P1.
In any case, here is my patch fixing this. The patch is in the attachment.
May be your patch will use a better approach.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (16 preceding siblings ...)
2021-01-12 15:12 ` vmakarov at gcc dot gnu.org
@ 2021-01-12 15:38 ` wirkus at gcc dot gnu.org
2021-01-12 16:28 ` cvs-commit at gcc dot gnu.org
` (11 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: wirkus at gcc dot gnu.org @ 2021-01-12 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #17 from Przemyslaw Wirkus <wirkus at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #16)
> (In reply to Przemyslaw Wirkus from comment #14)
> > Hi Vladimir,
> >
> > I'm assigned to the issue and I'm working on it. I think I got the root
> > cause.
> > I'm in the process of creating a patch after I complete few tests.
> >
> > kind regards
> > Przemyslaw
>
> Sorry, it was not clear for me that somebody was working on the patch. The
> bug is actually severe and should be classified as P1.
>
> In any case, here is my patch fixing this. The patch is in the attachment.
> May be your patch will use a better approach.
No worries, we were looking at the problem from Arm's backend pov.
Regardless, please carry on with your patch for this PR as my solution was just
masking the core issue you've addressed.
Thank you for looking at this, cheers!
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (17 preceding siblings ...)
2021-01-12 15:38 ` wirkus at gcc dot gnu.org
@ 2021-01-12 16:28 ` cvs-commit at gcc dot gnu.org
2021-01-13 17:24 ` pmiscml at gmail dot com
` (10 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-12 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:
https://gcc.gnu.org/g:cf2ac1c30af0fa783c8d72e527904dda5d8cc330
commit r11-6615-gcf2ac1c30af0fa783c8d72e527904dda5d8cc330
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Tue Jan 12 11:26:15 2021 -0500
[PR97969] LRA: Transform pattern `plus (plus (hard reg, const), pseudo)`
after elimination
LRA can loop infinitely on targets without `reg + imm` insns. Register
elimination
on such targets can increase register pressure resulting in permanent
stack size increase and changing elimination offset. To avoid such
situation, a simple
transformation can be done to avoid register pressure increase after
generating reload insns containing eliminated hard regs.
gcc/ChangeLog:
PR target/97969
* lra-eliminations.c (eliminate_regs_in_insn): Add transformation
of pattern 'plus (plus (hard reg, const), pseudo)'.
gcc/testsuite/ChangeLog:
PR target/97969
* gcc.target/arm/pr97969.c: New.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (18 preceding siblings ...)
2021-01-12 16:28 ` cvs-commit at gcc dot gnu.org
@ 2021-01-13 17:24 ` pmiscml at gmail dot com
2021-01-15 10:02 ` wirkus at gcc dot gnu.org
` (9 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: pmiscml at gmail dot com @ 2021-01-13 17:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #19 from Paul Sokolovsky <pmiscml at gmail dot com> ---
Vladimir Makarov, Przemyslaw Wirkus: Thanks looking into this issue and fixing
it!
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (19 preceding siblings ...)
2021-01-13 17:24 ` pmiscml at gmail dot com
@ 2021-01-15 10:02 ` wirkus at gcc dot gnu.org
2021-01-20 17:37 ` vmakarov at gcc dot gnu.org
` (8 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: wirkus at gcc dot gnu.org @ 2021-01-15 10:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #20 from Przemyslaw Wirkus <wirkus at gcc dot gnu.org> ---
Just a heads-up:
I would like to suggest backport for this patch to GCC 9 and 10. Quoting
Vladimir:
> The bug is actually severe and should be classified as P1
Currently patch applies cleanly for both gcc-9 and gcc-10 branches.
I will firstly bootstrap both toolchains (9&10) with this change and run some
tests. After I'm done and all is OK I will properly ask for backport.
Again, Vladimir, thank you for the fix!
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (20 preceding siblings ...)
2021-01-15 10:02 ` wirkus at gcc dot gnu.org
@ 2021-01-20 17:37 ` vmakarov at gcc dot gnu.org
2021-01-21 23:10 ` vmakarov at gcc dot gnu.org
` (7 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-01-20 17:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #21 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Additional fix for PR98722 is necessary for this PR.
4334b524274203125193a08a8485250c41c2daa9
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (21 preceding siblings ...)
2021-01-20 17:37 ` vmakarov at gcc dot gnu.org
@ 2021-01-21 23:10 ` vmakarov at gcc dot gnu.org
2021-05-04 12:31 ` [Bug target/97969] [9/10/11/12 " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-01-21 23:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #22 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #21)
> Additional fix for PR98722 is necessary for this PR.
>
> 4334b524274203125193a08a8485250c41c2daa9
Sorry, one more fix for PR98777 is necessary for the PR:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=68ba1039c7daf0485b167fe199ed7e8031158091
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11/12 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (22 preceding siblings ...)
2021-01-21 23:10 ` vmakarov at gcc dot gnu.org
@ 2021-05-04 12:31 ` rguenth at gcc dot gnu.org
2021-05-25 9:18 ` przemyslaw.wirkus at arm dot com
` (5 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11/12 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (23 preceding siblings ...)
2021-05-04 12:31 ` [Bug target/97969] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-05-25 9:18 ` przemyslaw.wirkus at arm dot com
2021-05-25 9:39 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: przemyslaw.wirkus at arm dot com @ 2021-05-25 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Przemyslaw Wirkus <przemyslaw.wirkus at arm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |przemyslaw.wirkus at arm dot com
--- Comment #23 from Przemyslaw Wirkus <przemyslaw.wirkus at arm dot com> ---
Just a follow up after GCC 11 release.
I've locally backported to gcc-10 branch (without any change to original
patches) PR97969 and following PR98722 & PR98777 patches.
Commits apply cleanly without changes.
Built and regression tested on:
* arm-none-eabi and
* aarch64-none-linux-gnu cross toolchains.
There were no issues and no regressions (all OK).
I've asked on mailing list for official backport approval.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11/12 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (24 preceding siblings ...)
2021-05-25 9:18 ` przemyslaw.wirkus at arm dot com
@ 2021-05-25 9:39 ` rguenth at gcc dot gnu.org
2021-05-25 10:06 ` wirkus at gcc dot gnu.org
` (3 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-25 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
So is this now fixed on trunk and the GCC 11 branch? Please update the summary
and known-to-work/fail accordingly,
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10/11/12 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (25 preceding siblings ...)
2021-05-25 9:39 ` rguenth at gcc dot gnu.org
@ 2021-05-25 10:06 ` wirkus at gcc dot gnu.org
2021-06-01 8:19 ` [Bug target/97969] [9/10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
29 siblings, 0 replies; 31+ messages in thread
From: wirkus at gcc dot gnu.org @ 2021-05-25 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #25 from Przemyslaw Wirkus <wirkus at gcc dot gnu.org> ---
Yes, it was applied to GCC 11 (then trunk) but we were waiting for GCC 11
release so I can backport at least to GCC 10.
After backport I guess we can close this PR.
PS: Updated "known to work/fail".
Cheers!
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (26 preceding siblings ...)
2021-05-25 10:06 ` wirkus at gcc dot gnu.org
@ 2021-06-01 8:19 ` rguenth at gcc dot gnu.org
2021-06-02 22:26 ` cvs-commit at gcc dot gnu.org
2022-05-27 8:57 ` [Bug target/97969] [9 " rguenth at gcc dot gnu.org
29 siblings, 0 replies; 31+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9/10 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (27 preceding siblings ...)
2021-06-01 8:19 ` [Bug target/97969] [9/10 " rguenth at gcc dot gnu.org
@ 2021-06-02 22:26 ` cvs-commit at gcc dot gnu.org
2022-05-27 8:57 ` [Bug target/97969] [9 " rguenth at gcc dot gnu.org
29 siblings, 0 replies; 31+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-02 22:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #27 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Przemyslaw Wirkus
<wirkus@gcc.gnu.org>:
https://gcc.gnu.org/g:eb13f3f81d56910626529af52e03e74770ffca98
commit r10-9880-geb13f3f81d56910626529af52e03e74770ffca98
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Tue Jan 12 11:26:15 2021 -0500
[PR97969] LRA: Transform pattern `plus (plus (hard reg, const), pseudo)`
after elimination
LRA can loop infinitely on targets without `reg + imm` insns. Register
elimination
on such targets can increase register pressure resulting in permanent
stack size increase and changing elimination offset. To avoid such
situation, a simple
transformation can be done to avoid register pressure increase after
generating reload insns containing eliminated hard regs.
gcc/ChangeLog:
PR target/97969
* lra-eliminations.c (eliminate_regs_in_insn): Add transformation
of pattern 'plus (plus (hard reg, const), pseudo)'.
gcc/testsuite/ChangeLog:
PR target/97969
* gcc.target/arm/pr97969.c: New.
(cherry picked from commit cf2ac1c30af0fa783c8d72e527904dda5d8cc330)
^ permalink raw reply [flat|nested] 31+ messages in thread
* [Bug target/97969] [9 Regression][ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use
2020-11-24 15:22 [Bug c/97969] New: [ARM/Thumb] Certain combo of codegen options leads to compilation infinite loop with growing memory use pmiscml at gmail dot com
` (28 preceding siblings ...)
2021-06-02 22:26 ` cvs-commit at gcc dot gnu.org
@ 2022-05-27 8:57 ` rguenth at gcc dot gnu.org
29 siblings, 0 replies; 31+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |9.5.0
Resolution|--- |FIXED
Target Milestone|9.5 |10.4
Status|ASSIGNED |RESOLVED
--- Comment #28 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 10.4.
^ permalink raw reply [flat|nested] 31+ messages in thread