Kugan Vivekanandarajah 1e314be3cc [PATCH] [AutoFDO/devirt] Fix ICE with duplicate speculative ID
This happens due to autoprofile pass makes edge make_speculative.
Then ipa-devirt does the same with the same speculative_id which
reults in duplicate speculative_id and ICE.

during IPA pass: cp
test.i:31:1: internal compiler error: verify_cgraph_node failed
0x39bfa6b internal_error(char const*, ...)
	../../gcc/gcc/diagnostic-global-context.cc:787
0x13914eb cgraph_node::verify_node()
	../../gcc/gcc/cgraph.cc:4454
0x13738ab symtab_node::verify()
	../../gcc/gcc/symtab.cc:1377
0x1373d1b symtab_node::verify_symtab_nodes()
	../../gcc/gcc/symtab.cc:1499
0x13a3653 symtab_node::checking_verify_symtab_nodes()
	../../gcc/gcc/cgraph.h:718
0x182d267 symbol_table::remove_unreachable_nodes(_IO_FILE*)
	../../gcc/gcc/ipa.cc:688
0x19f8c33 execute_todo
	../../gcc/gcc/passes.cc:2163

We may also have to check if the speculative edge is present
before making speculative.

gcc/ChangeLog:

2025-12-22  Kugan Vivekanandarajah  <kvivekananda@nvidia.com>

	* cgraph.cc (cgraph_edge::get_next_speculative_id): New.
	* cgraph.h (cgraph_edge::get_next_speculative_id): New.
	* ipa-devirt.cc (ipa_devirt): Use get_next_speculative_id
	in make_speculative.

Signed-off-by: Kugan Vivekanandarajah <kvivekananda@nvidia.com>
2026-01-02 07:59:11 +11:00
2025-12-31 00:16:24 +00:00
2025-12-27 00:16:26 +00:00
2025-08-29 00:19:55 +00:00
2025-12-13 00:16:34 +00:00
2025-12-30 00:16:33 +00:00
2025-12-30 00:16:33 +00:00
2026-01-01 18:50:16 +01:00
2025-12-30 00:16:33 +00:00
2025-12-01 00:16:36 +00:00
2025-12-30 00:16:33 +00:00
2025-12-30 00:16:33 +00:00
2026-01-01 18:50:16 +01:00
2025-12-30 00:16:33 +00:00
2025-12-30 00:16:33 +00:00
2025-12-22 00:16:25 +00:00
2025-12-30 00:16:33 +00:00
2025-12-31 00:16:24 +00:00
2025-11-30 01:52:24 +01:00
2025-10-11 11:08:01 +02: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 1.5 GiB
Languages
C++ 30.7%
C 30%
Ada 14.5%
D 6.1%
Go 5.7%
Other 12.5%