gcc/0184-Fix-fail-in-IPA-prefetch-src-openEuler-gcc-I8RURA.patch
2024-01-26 11:39:25 +08:00

46 lines
1.4 KiB
Diff

From 2a5c250262ec0497a5efbbd1d0d67e7147696074 Mon Sep 17 00:00:00 2001
From: Diachkov Ilia <diachkov.ilia1@huawei-partners.com>
Date: Thu, 28 Dec 2023 20:20:16 +0800
Subject: [PATCH 1/2] Fix fail in IPA prefetch (src-openEuler/gcc: I8RURA)
---
gcc/ipa-devirt.c | 9 ++++++---
gcc/ipa-prefetch.c | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index ed19a57a4..9863084e4 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -4995,9 +4995,12 @@ analyze_assign_stmt (gimple *stmt)
}
else
{
- fprintf (dump_file, "\nUnsupported rhs type %s in assign stmt: ",
- get_tree_code_name (TREE_CODE (rhs)));
- print_gimple_stmt (dump_file, stmt, 0);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "\nUnsupported rhs type %s in assign stmt: ",
+ get_tree_code_name (TREE_CODE (rhs)));
+ print_gimple_stmt (dump_file, stmt, 0);
+ }
gcc_unreachable ();
}
}
diff --git a/gcc/ipa-prefetch.c b/gcc/ipa-prefetch.c
index a471b118e..24cb4424a 100644
--- a/gcc/ipa-prefetch.c
+++ b/gcc/ipa-prefetch.c
@@ -1730,6 +1730,7 @@ optimize_function (cgraph_node *n, function *fn)
for (unsigned i = 0; i < pcalls.length (); i++)
create_cgraph_edge (n, pcalls[i]);
ipa_update_overall_fn_summary (n);
+ renumber_gimple_stmt_uids (DECL_STRUCT_FUNCTION (n->decl));
return 1;
}
--
2.33.0