Richard Biener f99d7d669e tree-optimization/107767 - not profitable switch conversion
When the CFG has not merged equal PHI defs in a switch stmt the
cost model from switch conversion gets off and we prefer a
jump table over branches.  The following fixes that by recording
cases that will be merged later and more appropriately counting
unique values.

	PR tree-optimization/107767
	* tree-cfgcleanup.cc (phi_alternatives_equal): Export.
	* tree-cfgcleanup.h (phi_alternatives_equal): Declare.
	* tree-switch-conversion.cc (switch_conversion::collect):
	Count unique non-default targets accounting for later
	merging opportunities.

	* gcc.dg/tree-ssa/pr107767.c: New testcase.
2023-01-11 13:13:50 +01:00
2023-01-10 00:18:07 +00:00
2022-11-15 08:32:29 +00:00
2023-01-07 00:17:28 +00:00
2022-11-24 00:17:47 +00:00
2022-09-01 00:17:39 +00:00
2022-08-31 00:16:45 +00:00
2022-12-22 00:17:29 +00:00
2022-11-24 00:17:47 +00:00
2023-01-08 00:16:59 +00:00
2023-01-07 00:17:28 +00:00
2022-11-02 00:17:38 +00:00
2023-01-10 00:18:07 +00:00
2023-01-08 00:16:59 +00:00
2023-01-08 00:16:59 +00:00
2023-01-08 00:16:59 +00:00
2023-01-07 00:17:28 +00:00
2023-01-08 00:16:59 +00:00
2023-01-08 00:16:59 +00:00
2023-01-03 00:17:09 +00:00
2023-01-03 00:17:09 +00:00
2022-12-20 00:17:00 +00:00
2023-01-08 00:16:59 +00:00
2023-01-11 00:17:56 +00:00
2023-01-08 00:16:59 +00:00
2022-11-24 00:17:47 +00:00
2022-12-01 00:17:51 +00:00
2022-11-24 00:17:47 +00:00
2022-07-19 17:07:04 +03:00
2023-01-11 00:17:56 +00:00

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.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.8%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.3%