mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-04 07:45:32 +08:00
Debugging the state explosion of the very large switch statement in gcc.dg/analyzer/pr96653.c showed that the worklist was failing to order the exploded nodes correctly; the in-edges at the join point after the switch were not getting processed together, but were instead being rocessed in smaller batches, bloating the exploded graph until the per-point limit was reached. The root cause turned out to be a bug in creating the strongly-connected components for the supergraph: the code was considering interprocedural edges as well as intraprocedural edges, leading to unpredictable misorderings of the SCC and worklist, leading to bloating of the exploded graph. This patch fixes the SCC creation so it only considers intraprocedural edges within the supergraph. It also tweaks worklist::key_t::cmp to give higher precedence to call_string over differences within a supernode, since enodes with different call_strings can't be merges. In practise, none of my test cases were affected by this latter change, though it seems to be the right thing to do. With this patch, the very large switch statement in gcc.dg/analyzer/pr96653.c is handled in a single call to exploded_graph::maybe_process_run_of_before_supernode_enodes: merged 358 in-enodes into 2 out-enode(s) at SN: 402 and that testcase no longer hits the per-program-point limits. gcc/analyzer/ChangeLog: * engine.cc (strongly_connected_components::strong_connect): Only consider intraprocedural edges when creating SCCs. (worklist::key_t::cmp): Add comment. Treat call_string differences as more important than differences of program_point within a supernode. gcc/testsuite/ChangeLog: PR analyzer/96653 * gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c: Update expected number of exploded nodes. * gcc.dg/analyzer/malloc-vs-local-1a.c: Update expected number of exploded nodes. * gcc.dg/analyzer/pr96653.c: Remove -Wno-analyzer-too-complex. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.