public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
@ 2022-12-13 18:40 jonas.keller@uni-bielefeld.de
2022-12-13 18:42 ` [Bug c++/108086] " jonas.keller@uni-bielefeld.de
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: jonas.keller@uni-bielefeld.de @ 2022-12-13 18:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Bug ID: 108086
Summary: internal compiler error: in set_accesses, at
rtl-ssa/internals.inl:449
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jonas.keller@uni-bielefeld.de
Target Milestone: ---
gcc Version: 12.2.0, as well as at least 5.1 until 7.4
command line that triggers the bug:
g++ -v -save-temps -freport-bug -mavx512f -O1 main.cpp
The bug also occurs with -O2 and -O3 but not with -O0.
It also does not seem to be dependend on a specific architecture, as long as
the architecture has avx512f, as the code depends on that.
The bug is present at least since gcc 5.1, as tested in compiler explorer.
I couldn't test it with newer versions than gcc 7.4, since the compilation
takes too long and is killed by compiler explorer.
The following output is generated by gcc:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-bootstrap
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--with-build-config=bootstrap-lto --with-linker-hash-style=gnu
--with-system-zlib --enable-__cxa_atexit --enable-cet=auto
--enable-checking=release --enable-clocale=gnu --enable-default-pie
--enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object
--enable-libstdcxx-backtrace --enable-link-serialization=1
--enable-linker-build-id --enable-lto --enable-multilib --enable-plugin
--enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-freport-bug' '-mavx512f' '-O1'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/cc1plus -E -quiet -v -D_GNU_SOURCE
main.cpp -mavx512f -mtune=generic -march=x86-64 -freport-bug -O1
-fpch-preprocess -o a-main.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/x86_64-pc-linux-gnu
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/backward
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include
/usr/local/include
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-freport-bug' '-mavx512f' '-O1'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/cc1plus -fpreprocessed a-main.ii
-quiet -dumpdir a- -dumpbase main.cpp -dumpbase-ext .cpp -mavx512f
-mtune=generic -march=x86-64 -O1 -version -freport-bug -o a-main.s
GNU C++17 (GCC) version 12.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version
4.1.0-p13, MPC version 1.2.1, isl version isl-0.25-GMP
warning: MPFR header version 4.1.0-p13 differs from library version 4.1.1-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (GCC) version 12.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version
4.1.0-p13, MPC version 1.2.1, isl version isl-0.25-GMP
warning: MPFR header version 4.1.0-p13 differs from library version 4.1.1-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 402ce889a414e2a3abbbe3146fa0a6cb
during RTL pass: fwprop1
main.cpp: In function ‘int main()’:
main.cpp:230:1: internal compiler error: in set_accesses, at
rtl-ssa/internals.inl:449
230 | }
| ^
0x19eab38 internal_error(char const*, ...)
???:0
0x6546f4 fancy_abort(char const*, int, char const*)
???:0
0x19f0d14
rtl_ssa::function_info::start_block(rtl_ssa::function_info::build_info&,
rtl_ssa::bb_info*)
???:0
0x19f0db3
rtl_ssa::function_info::bb_walker::before_dom_children(basic_block_def*)
???:0
0x1808697 dom_walker::walk(basic_block_def*)
???:0
0x19f1b38 rtl_ssa::function_info::process_all_blocks()
???:0
0x194bda4 rtl_ssa::function_info::function_info(function*)
???:0
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
Preprocessed source stored into /tmp/ccDnfPKX.out file, please attach this to
your bugreport.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug c++/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
@ 2022-12-13 18:42 ` jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jonas.keller@uni-bielefeld.de @ 2022-12-13 18:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #1 from Jonas Keller <jonas.keller@uni-bielefeld.de> ---
Created attachment 54079
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54079&action=edit
The file generated by -freport-bug
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug c++/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
2022-12-13 18:42 ` [Bug c++/108086] " jonas.keller@uni-bielefeld.de
@ 2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jonas.keller@uni-bielefeld.de @ 2022-12-13 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #2 from Jonas Keller <jonas.keller@uni-bielefeld.de> ---
Created attachment 54080
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54080&action=edit
preprocessed source
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug c++/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
2022-12-13 18:42 ` [Bug c++/108086] " jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
@ 2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-14 8:35 ` [Bug rtl-optimization/108086] " rguenth at gcc dot gnu.org
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jonas.keller@uni-bielefeld.de @ 2022-12-13 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #3 from Jonas Keller <jonas.keller@uni-bielefeld.de> ---
Created attachment 54081
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54081&action=edit
source
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (2 preceding siblings ...)
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
@ 2022-12-14 8:35 ` rguenth at gcc dot gnu.org
2022-12-14 8:47 ` rguenth at gcc dot gnu.org
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-14 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-14
CC| |rsandifo at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with 12.2.0
during RTL pass: fwprop1
main.cpp: In function ‘int main()’:
main.cpp:230:1: internal compiler error: in set_accesses, at
rtl-ssa/internals.inl:449
0x6ca5e3 rtl_ssa::insn_info::set_accesses(rtl_ssa::access_info**, unsigned int,
unsigned int)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/internals.inl:449
0x6ca5e3 rtl_ssa::insn_info::set_accesses(rtl_ssa::access_info**, unsigned int,
unsigned int)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/internals.inl:444
0x6ca5e3 rtl_ssa::function_info::finish_insn_accesses(rtl_ssa::insn_info*)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/insns.cc:407
0x1b0cabc
rtl_ssa::function_info::start_block(rtl_ssa::function_info::build_info&,
rtl_ssa::bb_info*)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/blocks.cc:1022
0x1b0cb5f
rtl_ssa::function_info::bb_walker::before_dom_children(basic_block_def*)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/blocks.cc:129
0x195216e dom_walker::walk(basic_block_def*)
/space/rguenther/src/gcc-12-branch/gcc/domwalk.cc:309
0x1b0d871 rtl_ssa::function_info::process_all_blocks()
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/blocks.cc:1252
0x1a83ba1 rtl_ssa::function_info::function_info(function*)
/space/rguenther/src/gcc-12-branch/gcc/rtl-ssa/functions.cc:50
0x1961033 fwprop_init
/space/rguenther/src/gcc-12-branch/gcc/fwprop.cc:906
0x1961033 fwprop
/space/rguenther/src/gcc-12-branch/gcc/fwprop.cc:976
we have
// Change the list of instruction accesses to ACCESSES, which contains
// NUM_DEFS definitions followed by NUM_USES uses.
inline void
insn_info::set_accesses (access_info **accesses,
unsigned int num_defs, unsigned int num_uses)
{
m_accesses = accesses;
m_num_defs = num_defs;
gcc_assert (num_defs == m_num_defs);
that's a strange assert ...
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (3 preceding siblings ...)
2022-12-14 8:35 ` [Bug rtl-optimization/108086] " rguenth at gcc dot gnu.org
@ 2022-12-14 8:47 ` rguenth at gcc dot gnu.org
2022-12-14 10:53 ` marxin at gcc dot gnu.org
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-14 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ick.
gcc/rtl-ssa/insns.h: unsigned int m_num_defs : 16;
(gdb) p num_defs
$1 = 86149
(gdb) p m_num_defs
$2 = 20613
(gdb) p m_rtl
$3 = (rtx_insn *) 0x0
(gdb) p is_phi ()
$4 = false
(gdb) p is_bb_head ()
$5 = false
(gdb) p is_artificial ()
$7 = true
m_bb is for ENTRY and for some reason that has a very big live-out bitmap?!
There might be a conservative way to handle this and not blow up where
it does right now?
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (4 preceding siblings ...)
2022-12-14 8:47 ` rguenth at gcc dot gnu.org
@ 2022-12-14 10:53 ` marxin at gcc dot gnu.org
2022-12-15 10:30 ` rguenth at gcc dot gnu.org
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-14 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Starts with r11-6188-g0b76990a9d75d97b. It's almost impossible to reduce the
test-case as it depends on always_inline :/
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (5 preceding siblings ...)
2022-12-14 10:53 ` marxin at gcc dot gnu.org
@ 2022-12-15 10:30 ` rguenth at gcc dot gnu.org
2022-12-15 10:32 ` cvs-commit at gcc dot gnu.org
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-15 10:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Samples: 877K of event 'cycles:u', Event count (approx.): 779618998855
Overhead Samples Command Shared Object Symbol
52.64% 461458 cc1plus cc1plus [.] ggc_internal_alloc
3.18% 27836 cc1plus cc1plus [.] bitmap_set_bit
2.66% 23374 cc1plus cc1plus [.]
hash_table<hash_map<tree_
2.37% 20813 cc1plus cc1plus [.] insert_decl_map
1.57% 13954 cc1plus cc1plus [.]
hash_table<hash_map<tree_
1.55% 13852 cc1plus [unknown] [k] 0xffffffffad200b47
1.30% 11443 cc1plus cc1plus [.] copy_bb
callgraph ipa passes : 238.97 ( 79%) 31.98 ( 96%) 270.98 ( 81%)
12908M ( 90%)
integration : 80.40 ( 27%) 19.17 ( 57%) 99.91 ( 30%)
11659M ( 81%)
tree eh : 23.57 ( 8%) 0.05 ( 0%) 23.65 ( 7%)
153M ( 1%)
tree operand scan : 134.50 ( 45%) 12.74 ( 38%) 146.64 ( 44%)
892M ( 6%)
I think this is the "known" issue of always-inline functions calling
always-inline functions, eventually leading to some exponential growth in size
of the callgraph, size estimation and code. We fail to elide the intermediate
functions early (and re-use the body for the last inline instance).
It's often better to use the flatten attribute on the outermost function
implementing a computation kernel.
A smaller "main" program is
void bar(__m512i *);
void foo(__m512i *input)
{
__m512i transVecs[64];
Transpose<0>::_transpose(input, transVecs);
bar (transVecs);
}
Reducing 64 to 32 (also in the templates) makes it compile almost instantly
but still
callgraph ipa passes : 11.74 ( 84%) 3.00 ( 91%) 14.74 ( 85%)
1617M ( 92%)
integration : 6.88 ( 49%) 1.75 ( 53%) 8.63 ( 50%)
1460M ( 83%)
tree operand scan : 3.04 ( 22%) 1.17 ( 35%) 4.31 ( 25%)
113M ( 7%)
I can halve the operand scan time.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (6 preceding siblings ...)
2022-12-15 10:30 ` rguenth at gcc dot gnu.org
@ 2022-12-15 10:32 ` cvs-commit at gcc dot gnu.org
2022-12-15 17:43 ` cvs-commit at gcc dot gnu.org
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-15 10:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:930b3d6948f2cddc6a7fc4b35bafda1deabcd0c9
commit r13-4714-g930b3d6948f2cddc6a7fc4b35bafda1deabcd0c9
Author: Richard Biener <rguenther@suse.de>
Date: Thu Dec 15 11:30:21 2022 +0100
middle-end/108086 - reduce operand scanner use from inliner
The following avoids a redundant second operand scan on all stmts
during inlining which shows with PR108086.
PR middle-end/108086
* tree-inline.cc (copy_edges_for_bb): Do not update all
stmts again.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (7 preceding siblings ...)
2022-12-15 10:32 ` cvs-commit at gcc dot gnu.org
@ 2022-12-15 17:43 ` cvs-commit at gcc dot gnu.org
2022-12-16 8:30 ` cvs-commit at gcc dot gnu.org
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-15 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:d49b2a3a1dbbe3ac9ae134bc5742be7fdb417d32
commit r13-4723-gd49b2a3a1dbbe3ac9ae134bc5742be7fdb417d32
Author: Richard Biener <rguenther@suse.de>
Date: Thu Dec 15 13:42:16 2022 +0100
middle-end/108086 - avoid quadraticness in copy_edges_for_bb
For the testcase in PR108086 it's visible that we split blocks
multiple times when inlining and that causes us to adjust the
block tail stmt BBs multiple times, once for each split. The
fix is to walk backwards and split from the tail instead.
For a reduced testcase this improves compile-time at -O by 4%.
PR middle-end/108086
* tree-inline.cc (copy_edges_for_bb): Walk stmts backwards for
splitting the block to avoid quadratic behavior with setting
stmts BB on multliple splits.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (8 preceding siblings ...)
2022-12-15 17:43 ` cvs-commit at gcc dot gnu.org
@ 2022-12-16 8:30 ` cvs-commit at gcc dot gnu.org
2022-12-16 9:29 ` cvs-commit at gcc dot gnu.org
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-16 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:711e0acdbb2645f5a8aa89014488c24e89ccb0f7
commit r13-4738-g711e0acdbb2645f5a8aa89014488c24e89ccb0f7
Author: Richard Biener <rguenther@suse.de>
Date: Fri Dec 16 09:25:40 2022 +0100
middle-end/108086 - more operand scanner reduction in inlining
There's another round of redundant operand scanning in
remap_gimple_stmt. The following removes this and also improves
one special-case to call a cheaper inline function.
PR middle-end/108086
* tree-inline.cc (remap_gimple_stmt): Add stmts to the
sequence without updating them. Simplify x == x detection.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (9 preceding siblings ...)
2022-12-16 8:30 ` cvs-commit at gcc dot gnu.org
@ 2022-12-16 9:29 ` cvs-commit at gcc dot gnu.org
2022-12-16 11:27 ` [Bug rtl-optimization/108086] [11/12/13 Regression] " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-16 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:340ddeae6611f6ab524211a009e97a85b4bba549
commit r13-4740-g340ddeae6611f6ab524211a009e97a85b4bba549
Author: Richard Biener <rguenther@suse.de>
Date: Fri Dec 16 09:46:25 2022 +0100
middle-end/108086 - remove PR28238 fix superseeded by PR34018 fix
There's quite special code in copy_bb that handles inline substitution
of a non-invariant address in place of an invariant one that's
now handled by more generic handling of this case in remap_gimple_op_r
so this removes the special casing that happens in a hot path, providing
a small speedup.
PR middle-end/108086
* tree-inline.cc (copy_bb): Remove handling of (foo *)&this->m
substitution which is done in remap_gimple_op_r via
re-gimplifying.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (10 preceding siblings ...)
2022-12-16 9:29 ` cvs-commit at gcc dot gnu.org
@ 2022-12-16 11:27 ` rguenth at gcc dot gnu.org
2022-12-16 11:32 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-16 11:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|internal compiler error: in |[11/12/13 Regression]
|set_accesses, at |internal compiler error: in
|rtl-ssa/internals.inl:449 |set_accesses, at
| |rtl-ssa/internals.inl:449
Target Milestone|--- |11.4
Known to fail| |11.3.0
Priority|P3 |P2
Keywords|needs-reduction |ice-on-valid-code
Known to work| |10.4.0
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
A regression from GCC 10 which compiles this in 90s at -O1.
Richard? Can you please look at this special-case of BB0 insn_info?
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (11 preceding siblings ...)
2022-12-16 11:27 ` [Bug rtl-optimization/108086] [11/12/13 Regression] " rguenth at gcc dot gnu.org
@ 2022-12-16 11:32 ` rguenth at gcc dot gnu.org
2022-12-16 12:06 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-16 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #12)
> A regression from GCC 10 which compiles this in 90s at -O1.
>
> Richard? Can you please look at this special-case of BB0 insn_info?
The following might be one way to "fix" it (until we do a bigger testcase)
diff --git a/gcc/rtl-ssa/insns.h b/gcc/rtl-ssa/insns.h
index f7215972845..b0144f258b2 100644
--- a/gcc/rtl-ssa/insns.h
+++ b/gcc/rtl-ssa/insns.h
@@ -403,8 +403,7 @@ private:
// MAX_RECOG_OPERANDS is the maximum number of pseudos that can be
// defined by an instruction, so the number of definitions should fit
// easily in 16 bits.
- unsigned int m_num_uses;
- unsigned int m_num_defs : 16;
+ unsigned int m_num_uses : 24;
// Flags returned by the accessors above.
unsigned int m_is_debug_insn : 1;
@@ -412,9 +411,13 @@ private:
unsigned int m_is_asm : 1;
unsigned int m_has_pre_post_modify : 1;
unsigned int m_has_volatile_refs : 1;
+ // For future expansion.
+ unsigned int m_spare : 3;
+ // Keep 32bit aligned
+ unsigned int m_num_defs : 24;
// For future expansion.
- unsigned int m_spare : 11;
+ unsigned int m_spare : 8;
// The program point at which the instruction occurs.
//
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (12 preceding siblings ...)
2022-12-16 11:32 ` rguenth at gcc dot gnu.org
@ 2022-12-16 12:06 ` cvs-commit at gcc dot gnu.org
2022-12-16 18:21 ` rsandifo at gcc dot gnu.org
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-16 12:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:da85bfc75024a92b97e60e4436863dd5789786ec
commit r13-4743-gda85bfc75024a92b97e60e4436863dd5789786ec
Author: Richard Biener <rguenther@suse.de>
Date: Fri Dec 16 13:01:40 2022 +0100
middle-end/108086 - avoid unshare_expr when remapping SSA names
r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but
that wasn't in the version of the patch posted. That has some
non-trivial cost through mostly_copy_tree_r and copy_tree_r but
more importantly it doesn't seem to be necessary. I've successfully
bootstrapped and tested with an assert we only get
tree_node_can_be_shared trees here.
Bootstrapped and tested on x86_64-unknown-linux-gnu with all
languages.
PR middle-end/108086
* tree-inline.cc (remap_ssa_name): Do not unshare the
result from the decl_map.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (13 preceding siblings ...)
2022-12-16 12:06 ` cvs-commit at gcc dot gnu.org
@ 2022-12-16 18:21 ` rsandifo at gcc dot gnu.org
2023-02-02 10:41 ` rsandifo at gcc dot gnu.org
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-12-16 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #15 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (14 preceding siblings ...)
2022-12-16 18:21 ` rsandifo at gcc dot gnu.org
@ 2023-02-02 10:41 ` rsandifo at gcc dot gnu.org
2023-02-02 14:53 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-02-02 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #16 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #13)
> (In reply to Richard Biener from comment #12)
> > A regression from GCC 10 which compiles this in 90s at -O1.
> >
> > Richard? Can you please look at this special-case of BB0 insn_info?
>
> The following might be one way to "fix" it (until we do a bigger testcase)
>
> diff --git a/gcc/rtl-ssa/insns.h b/gcc/rtl-ssa/insns.h
> index f7215972845..b0144f258b2 100644
> --- a/gcc/rtl-ssa/insns.h
> +++ b/gcc/rtl-ssa/insns.h
> @@ -403,8 +403,7 @@ private:
> // MAX_RECOG_OPERANDS is the maximum number of pseudos that can be
> // defined by an instruction, so the number of definitions should fit
> // easily in 16 bits.
> - unsigned int m_num_uses;
> - unsigned int m_num_defs : 16;
> + unsigned int m_num_uses : 24;
The problem is that:
// The number of definitions and the number uses. FIRST_PSEUDO_REGISTER + 1
// is the maximum number of accesses to hard registers and memory, and
// MAX_RECOG_OPERANDS is the maximum number of pseudos that can be
// defined by an instruction, so the number of definitions should fit
// easily in 16 bits.
holds for real instructions, but not for artificial instructions.
Since we don't have any new justification for a limit less than 32 bits,
I think we'll just have to grow the structure.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12/13 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (15 preceding siblings ...)
2023-02-02 10:41 ` rsandifo at gcc dot gnu.org
@ 2023-02-02 14:53 ` cvs-commit at gcc dot gnu.org
2023-04-03 8:57 ` [Bug rtl-optimization/108086] [11/12 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-02 14:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:cd41085a37b8288dbdfe0f81027ce04b978578f1
commit r13-5658-gcd41085a37b8288dbdfe0f81027ce04b978578f1
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Thu Feb 2 14:53:34 2023 +0000
rtl-ssa: Extend m_num_defs to a full unsigned int [PR108086]
insn_info tried to save space by storing the number of
definitions in a 16-bit bitfield. The justification was:
// ... FIRST_PSEUDO_REGISTER + 1
// is the maximum number of accesses to hard registers and memory, and
// MAX_RECOG_OPERANDS is the maximum number of pseudos that can be
// defined by an instruction, so the number of definitions should fit
// easily in 16 bits.
But while that reasoning holds (I think) for real instructions,
it doesn't hold for artificial instructions. I don't think there's
any sensible higher limit we can use, so this patch goes for a full
unsigned int.
gcc/
PR rtl-optimization/108086
* rtl-ssa/insns.h (insn_info): Make m_num_defs a full unsigned int.
Adjust size-related commentary accordingly.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11/12 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (16 preceding siblings ...)
2023-02-02 14:53 ` cvs-commit at gcc dot gnu.org
@ 2023-04-03 8:57 ` cvs-commit at gcc dot gnu.org
2023-04-14 13:15 ` [Bug rtl-optimization/108086] [11 " hubicka at gcc dot gnu.org
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-03 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:160c5f354a6dc8a660ff8ad8574279b0d3fb412d
commit r12-9377-g160c5f354a6dc8a660ff8ad8574279b0d3fb412d
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Mon Apr 3 09:57:05 2023 +0100
rtl-ssa: Extend m_num_defs to a full unsigned int [PR108086]
insn_info tried to save space by storing the number of
definitions in a 16-bit bitfield. The justification was:
// ... FIRST_PSEUDO_REGISTER + 1
// is the maximum number of accesses to hard registers and memory, and
// MAX_RECOG_OPERANDS is the maximum number of pseudos that can be
// defined by an instruction, so the number of definitions should fit
// easily in 16 bits.
But while that reasoning holds (I think) for real instructions,
it doesn't hold for artificial instructions. I don't think there's
any sensible higher limit we can use, so this patch goes for a full
unsigned int.
gcc/
PR rtl-optimization/108086
* rtl-ssa/insns.h (insn_info): Make m_num_defs a full unsigned int.
Adjust size-related commentary accordingly.
(cherry picked from commit cd41085a37b8288dbdfe0f81027ce04b978578f1)
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (17 preceding siblings ...)
2023-04-03 8:57 ` [Bug rtl-optimization/108086] [11/12 " cvs-commit at gcc dot gnu.org
@ 2023-04-14 13:15 ` hubicka at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2024-02-19 13:43 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: hubicka at gcc dot gnu.org @ 2023-04-14 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #19 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
With trunk I now get:
phase opt and generate : 71.71 (100%) 4.60 ( 95%) 76.32 ( 99%)
2848M ( 98%)
callgraph functions expansion : 27.25 ( 38%) 1.65 ( 34%) 28.90 ( 38%)
510M ( 17%)
callgraph ipa passes : 44.43 ( 62%) 2.95 ( 61%) 47.38 ( 62%)
2333M ( 80%)
integration : 6.99 ( 10%) 1.05 ( 22%) 8.01 ( 10%)
1998M ( 68%)
tree PTA : 36.28 ( 50%) 2.52 ( 52%) 38.80 ( 50%)
45k ( 0%)
combiner : 3.96 ( 5%) 0.00 ( 0%) 3.96 ( 5%)
41M ( 1%)
with over 5% runtime. Perf claims it is mostly bitmap operations:
16.91% cc1plus cc1plus [.] bitmap_ior_into
12.22% cc1plus cc1plus [.] bitmap_set_bit
3.58% cc1plus cc1plus [.] 0x00000000011cad58
1.97% cc1plus cc1plus [.] bitmap_bit_p
1.80% cc1plus cc1plus [.] bitmap_copy
1.24% cc1plus cc1plus [.] htab_find_slot_with_hash
1.13% cc1plus cc1plus [.] 0x00000000011cad70
1.11% cc1plus cc1plus [.] refers_to_regno_p
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (18 preceding siblings ...)
2023-04-14 13:15 ` [Bug rtl-optimization/108086] [11 " hubicka at gcc dot gnu.org
@ 2023-05-29 10:07 ` jakub at gcc dot gnu.org
2024-02-19 13:43 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug rtl-optimization/108086] [11 Regression] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
` (19 preceding siblings ...)
2023-05-29 10:07 ` jakub at gcc dot gnu.org
@ 2024-02-19 13:43 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-19 13:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108086
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
Last reconfirmed|2022-12-14 00:00:00 |2024-2-19
--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed. With GCC 14 and -O1 -march=znver4
callgraph ipa passes : 27.15 ( 63%)
integration : 3.94 ( 9%)
tree PTA : 22.08 ( 51%)
TOTAL : 43.39
43.39user 5.68system 0:49.64elapsed 98%CPU (0avgtext+0avgdata
7653028maxresident)k
7088inputs+0outputs (3major+3498835minor)pagefaults 0swaps
I'm keeping Richard assigned, but that was for the RTL-SSA ICE still in GCC 11.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-02-19 13:43 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 18:40 [Bug c++/108086] New: internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449 jonas.keller@uni-bielefeld.de
2022-12-13 18:42 ` [Bug c++/108086] " jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-14 8:35 ` [Bug rtl-optimization/108086] " rguenth at gcc dot gnu.org
2022-12-14 8:47 ` rguenth at gcc dot gnu.org
2022-12-14 10:53 ` marxin at gcc dot gnu.org
2022-12-15 10:30 ` rguenth at gcc dot gnu.org
2022-12-15 10:32 ` cvs-commit at gcc dot gnu.org
2022-12-15 17:43 ` cvs-commit at gcc dot gnu.org
2022-12-16 8:30 ` cvs-commit at gcc dot gnu.org
2022-12-16 9:29 ` cvs-commit at gcc dot gnu.org
2022-12-16 11:27 ` [Bug rtl-optimization/108086] [11/12/13 Regression] " rguenth at gcc dot gnu.org
2022-12-16 11:32 ` rguenth at gcc dot gnu.org
2022-12-16 12:06 ` cvs-commit at gcc dot gnu.org
2022-12-16 18:21 ` rsandifo at gcc dot gnu.org
2023-02-02 10:41 ` rsandifo at gcc dot gnu.org
2023-02-02 14:53 ` cvs-commit at gcc dot gnu.org
2023-04-03 8:57 ` [Bug rtl-optimization/108086] [11/12 " cvs-commit at gcc dot gnu.org
2023-04-14 13:15 ` [Bug rtl-optimization/108086] [11 " hubicka at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2024-02-19 13:43 ` 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).