Go to file
Marek Polacek 765c3b8f82 c++: Fix compile-time-hog in cp_fold_immediate_r [PR111660]
My recent patch introducing cp_fold_immediate_r caused exponential
compile time with nested COND_EXPRs.  The problem is that the COND_EXPR
case recursively walks the arms of a COND_EXPR, but after processing
both arms it doesn't end the walk; it proceeds to walk the
sub-expressions of the outermost COND_EXPR, triggering again walking
the arms of the nested COND_EXPR, and so on.  This patch brings the
compile time down to about 0m0.030s.

The ff_fold_immediate flag is unused after this patch but since I'm
using it in the P2564 patch, I'm not removing it now.  Maybe at_eof
can be used instead and then we can remove ff_fold_immediate.

	PR c++/111660

gcc/cp/ChangeLog:

	* cp-gimplify.cc (cp_fold_immediate_r) <case COND_EXPR>: Don't
	handle it here.
	(cp_fold_r): Handle COND_EXPR here.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/hog1.C: New test.
	* g++.dg/cpp2a/consteval36.C: New test.
2023-10-17 17:41:44 -04:00
c++tools Daily bump. 2023-06-23 00:16:38 +00:00
config Daily bump. 2023-09-16 00:17:55 +00:00
contrib Daily bump. 2023-10-06 00:17:37 +00:00
fixincludes Daily bump. 2023-08-18 00:16:52 +00:00
gcc c++: Fix compile-time-hog in cp_fold_immediate_r [PR111660] 2023-10-17 17:41:44 -04:00
gnattools
gotools
include Daily bump. 2023-10-13 00:18:18 +00:00
INSTALL
intl Daily bump. 2023-08-08 00:17:37 +00:00
libada Daily bump. 2023-08-08 00:17:37 +00:00
libatomic Daily bump. 2023-08-08 00:17:37 +00:00
libbacktrace Daily bump. 2023-08-08 00:17:37 +00:00
libcc1 Daily bump. 2023-08-12 00:17:36 +00:00
libcody
libcpp Daily bump. 2023-10-09 00:17:27 +00:00
libdecnumber
libffi Daily bump. 2023-08-24 00:18:18 +00:00
libgcc LibF7: Re-generate f7-renames.h to pick up white-space from f7renames.sh. 2023-10-17 17:19:36 +02:00
libgfortran Daily bump. 2023-09-29 00:17:28 +00:00
libgm2 Daily bump. 2023-09-30 00:17:24 +00:00
libgo libgo: fix DejaGNU testsuite compiler when using build sysroot 2023-09-12 13:19:42 -07:00
libgomp Daily bump. 2023-10-16 00:17:13 +00:00
libiberty Daily bump. 2023-08-23 00:17:59 +00:00
libitm Daily bump. 2023-08-08 00:17:37 +00:00
libobjc Daily bump. 2023-08-08 00:17:37 +00:00
libphobos Daily bump. 2023-10-17 00:17:33 +00:00
libquadmath Daily bump. 2023-08-08 00:17:37 +00:00
libsanitizer Daily bump. 2023-08-08 00:17:37 +00:00
libssp Daily bump. 2023-08-08 00:17:37 +00:00
libstdc++-v3 Daily bump. 2023-10-14 00:16:40 +00:00
libvtv Daily bump. 2023-08-08 00:17:37 +00:00
lto-plugin Daily bump. 2023-08-08 00:17:37 +00:00
maintainer-scripts Daily bump. 2023-07-08 00:16:53 +00:00
zlib Daily bump. 2023-08-08 00:17:37 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-10-16 00:17:13 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
config.guess
config.rpath
config.sub
configure LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
configure.ac LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 libtool.m4: augment symcode for Solaris 11 2023-08-07 22:59:41 +02:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Fix write after approval name order 2023-10-11 14:53:44 +02:00
Makefile.def sim: add distclean dep for gnulib 2023-10-15 22:40:42 +05:45
Makefile.in sim: add distclean dep for gnulib 2023-10-15 22:40:42 +05:45
Makefile.tpl Makefile.tpl: disable -Werror for feedback stage [PR111663] 2023-10-06 20:25:20 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt secpol: consistent indentation 2023-10-05 12:00:39 -04:00
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.