diff options
author | Michal Jires <mjires@suse.cz> | 2025-01-16 14:42:59 +0100 |
---|---|---|
committer | Michal Jires <mjires@suse.cz> | 2025-01-18 20:40:47 +0100 |
commit | 557d1a44ece3b9cf0084a4ebcc2e50875d788393 (patch) | |
tree | a051b523a60d84d7d35c7d02221b62c85f76499f /gcc/dumpfile.cc | |
parent | d309844d6fe02e695eb82cbd30fd135e836f24eb (diff) | |
download | gcc-557d1a44ece3b9cf0084a4ebcc2e50875d788393.zip gcc-557d1a44ece3b9cf0084a4ebcc2e50875d788393.tar.gz gcc-557d1a44ece3b9cf0084a4ebcc2e50875d788393.tar.bz2 |
Fix uniqueness of symtab_node::get_dump_name.
symtab_node::get_dump_name uses node order to identify nodes.
Order is no longer unique because of Incremental LTO patches.
This patch moves uid from cgraph_node node to symtab_node,
so get_dump_name can use uid instead and get back unique dump names.
In inlining passes, uid is replaced with more appropriate (more compact
for indexing) summary id.
Bootstrapped/regtested on x86_64-linux.
Ok for trunk?
gcc/ChangeLog:
* cgraph.cc (symbol_table::create_empty):
Move uid to symtab_node.
(test_symbol_table_test): Change expected dump id.
* cgraph.h (struct cgraph_node):
Move uid to symtab_node.
(symbol_table::register_symbol): Likewise.
* dumpfile.cc (test_capture_of_dump_calls):
Change expected dump id.
* ipa-inline.cc (update_caller_keys):
Use summary id instead of uid.
(update_callee_keys): Likewise.
* symtab.cc (symtab_node::get_dump_name):
Use uid instead of order.
gcc/testsuite/ChangeLog:
* gcc.dg/live-patching-1.c: Change expected dump id.
* gcc.dg/live-patching-4.c: Likewise.
Diffstat (limited to 'gcc/dumpfile.cc')
-rw-r--r-- | gcc/dumpfile.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/dumpfile.cc b/gcc/dumpfile.cc index 3765e9e..65bd5c5 100644 --- a/gcc/dumpfile.cc +++ b/gcc/dumpfile.cc @@ -2407,7 +2407,7 @@ test_capture_of_dump_calls (const line_table_case &case_) dump_printf (MSG_NOTE, "node: %C", node); const int expected_impl_line = __LINE__ - 1; - ASSERT_DUMPED_TEXT_EQ (tmp, "node: test_decl/0"); + ASSERT_DUMPED_TEXT_EQ (tmp, "node: test_decl/1"); if (with_optinfo) { optinfo *info = tmp.get_pending_optinfo (); @@ -2415,7 +2415,7 @@ test_capture_of_dump_calls (const line_table_case &case_) ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 2); ASSERT_IS_TEXT (info->get_item (0), "node: "); - ASSERT_IS_SYMTAB_NODE (info->get_item (1), decl_loc, "test_decl/0"); + ASSERT_IS_SYMTAB_NODE (info->get_item (1), decl_loc, "test_decl/1"); ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (), "dumpfile.cc", expected_impl_line, "test_capture_of_dump_calls"); @@ -2594,14 +2594,14 @@ test_capture_of_dump_calls (const line_table_case &case_) dump_symtab_node (MSG_NOTE, node); const int expected_impl_line = __LINE__ - 1; - ASSERT_DUMPED_TEXT_EQ (tmp, "test_decl/0"); + ASSERT_DUMPED_TEXT_EQ (tmp, "test_decl/1"); if (with_optinfo) { optinfo *info = tmp.get_pending_optinfo (); ASSERT_TRUE (info != NULL); ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE); ASSERT_EQ (info->num_items (), 1); - ASSERT_IS_SYMTAB_NODE (info->get_item (0), decl_loc, "test_decl/0"); + ASSERT_IS_SYMTAB_NODE (info->get_item (0), decl_loc, "test_decl/1"); ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (), "dumpfile.cc", expected_impl_line, "test_capture_of_dump_calls"); |