public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og
@ 2022-03-16 21:29 zsojka at seznam dot cz
  2022-03-16 21:37 ` [Bug rtl-optimization/104961] [9/10/11/12 Regression] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2022-03-16 21:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

            Bug ID: 104961
           Summary: compilation never (?) finishes at -Og
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, memory-hog
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 52638
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52638&action=edit
reduced testcase

Compiler output:
$ time x86_64-pc-linux-gnu-gcc -O testcase.c -c

real    0m0.034s
user    0m0.028s
sys     0m0.007s

$ time x86_64-pc-linux-gnu-gcc -Og testcase.c -c
^C

real    2m5.070s
user    0m0.001s
sys     0m0.000s


The compilation doesn't seem to ever finish. The cc1 binary is just eating more
memory over time.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-7654-20220315102422-gda24fce323e-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-7654-20220315102422-gda24fce323e-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220315 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [9/10/11/12 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
@ 2022-03-16 21:37 ` mpolacek at gcc dot gnu.org
  2022-03-17 16:20 ` vmakarov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-03-16 21:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-16
           Priority|P3                          |P2
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |9.5
            Summary|compilation never (?)       |[9/10/11/12 Regression]
                   |finishes at -Og             |compilation never (?)
                   |                            |finishes at -Og
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  Started with

commit 7293e3f58edb7535d826c85160b9fa6d4132ffea
Author: Vladimir Makarov <vmakarov@redhat.com>
Date:   Fri Mar 16 18:48:26 2018 +0000

    re PR target/84876 (ICE on invalid code in lra_assign at
gcc/lra-assigns.c:1601 since r258504)

    2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>

            PR target/84876
            * lra-assigns.c (lra_split_hard_reg_for): Don't use
            regno_allocno_class_array and sorted_pseudos.
            * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
            insns where regno is used.

    2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>

            PR target/84876
            * gcc.target/i386/pr84876.c: New test.

    From-SVN: r258602

which fixed an ICE:
/home/mpolacek/q.c: In function ‘foo’:
/home/mpolacek/q.c:12:1: error: unable to find a register to spill
 }
 ^
/home/mpolacek/q.c:12:1: error: this is the insn:
(insn 15 32 33 2 (parallel [
            (set (reg/v:TI 105 [orig:91 j ] [91])
                (mult:TI (zero_extend:TI (subreg/j:DI (reg/v:TI 105 [orig:91 j
] [91]) 0))
                    (zero_extend:TI (reg:DI 102 [ i.0_1 ]))))
            (clobber (reg:CC 17 flags))
        ]) "/home/mpolacek/q.c":8 356 {*umulditi3_1}
     (expr_list:REG_DEAD (reg:DI 102 [ i.0_1 ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
during RTL pass: reload
/home/mpolacek/q.c:12:1: internal compiler error: in lra_split_hard_reg_for, at
lra-assigns.c:1805
unrecognized DWARF version in .debug_info at 6
0xf1752d _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/rtl-error.c:108
0xd773ae lra_split_hard_reg_for()
        ../../gcc/lra-assigns.c:1805
0xd6fcb8 lra(_IO_FILE*)
        ../../gcc/lra.c:2507
0xd17143 do_reload
        ../../gcc/ira.c:5465
0xd17636 execute
        ../../gcc/ira.c:5649

Compiled fine with GCC 5 -> regression.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [9/10/11/12 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
  2022-03-16 21:37 ` [Bug rtl-optimization/104961] [9/10/11/12 Regression] " mpolacek at gcc dot gnu.org
@ 2022-03-17 16:20 ` vmakarov at gcc dot gnu.org
  2022-03-18 18:25 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2022-03-17 16:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

--- Comment #2 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
I've reproduced the bug.  The mentioned patch is not the cause but a trigger. 
The origin of the problem is actually a removal of hard reg propagation before
RA which happened about year ago.

I hope the fix will be ready on Friday or Monday.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [9/10/11/12 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
  2022-03-16 21:37 ` [Bug rtl-optimization/104961] [9/10/11/12 Regression] " mpolacek at gcc dot gnu.org
  2022-03-17 16:20 ` vmakarov at gcc dot gnu.org
@ 2022-03-18 18:25 ` cvs-commit at gcc dot gnu.org
  2022-03-19  7:54 ` [Bug rtl-optimization/104961] [9/10/11 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-18 18:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

--- Comment #3 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:0c016888ffd569c4b70722cf7df2efcc003f397b

commit r12-7716-g0c016888ffd569c4b70722cf7df2efcc003f397b
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Fri Mar 18 14:23:40 2022 -0400

    [PR104961] LRA: split hard reg for reload pseudo with clobber.

    Splitting hard register live range did not work for subreg of a
    multi-reg reload pseudo.  Reload insns for such pseudo contain clobber
    of the pseudo and splitting did not take this into account.  The patch
    fixes it.

    gcc/ChangeLog:

            PR rtl-optimization/104961
            * lra-assigns.cc (find_reload_regno_insns): Process reload pseudo
clobber.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/104961
            * gcc.target/i386/pr104961.c: New.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [9/10/11 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-03-18 18:25 ` cvs-commit at gcc dot gnu.org
@ 2022-03-19  7:54 ` jakub at gcc dot gnu.org
  2022-05-27  9:47 ` [Bug rtl-optimization/104961] [10/11 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-19  7:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
            Summary|[9/10/11/12 Regression]     |[9/10/11 Regression]
                   |compilation never (?)       |compilation never (?)
                   |finishes at -Og             |finishes at -Og

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [10/11 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2022-03-19  7:54 ` [Bug rtl-optimization/104961] [9/10/11 " jakub at gcc dot gnu.org
@ 2022-05-27  9:47 ` rguenth at gcc dot gnu.org
  2022-06-28 10:48 ` jakub at gcc dot gnu.org
  2023-07-07 10:42 ` [Bug rtl-optimization/104961] [11 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [10/11 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2022-05-27  9:47 ` [Bug rtl-optimization/104961] [10/11 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:48 ` jakub at gcc dot gnu.org
  2023-07-07 10:42 ` [Bug rtl-optimization/104961] [11 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/104961] [11 Regression] compilation never (?) finishes at -Og
  2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2022-06-28 10:48 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:42 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104961

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-07 10:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 21:29 [Bug rtl-optimization/104961] New: compilation never (?) finishes at -Og zsojka at seznam dot cz
2022-03-16 21:37 ` [Bug rtl-optimization/104961] [9/10/11/12 Regression] " mpolacek at gcc dot gnu.org
2022-03-17 16:20 ` vmakarov at gcc dot gnu.org
2022-03-18 18:25 ` cvs-commit at gcc dot gnu.org
2022-03-19  7:54 ` [Bug rtl-optimization/104961] [9/10/11 " jakub at gcc dot gnu.org
2022-05-27  9:47 ` [Bug rtl-optimization/104961] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug rtl-optimization/104961] [11 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).