From c625e2c7cec00d34d0517f0214968aebb74f4bae Mon Sep 17 00:00:00 2001 From: huang-xiaoquan Date: Wed, 12 Feb 2025 15:47:18 +0800 Subject: [PATCH] Reduce ipa-inline warning output. --- 0337-Reduce-ipa-inline-warning-output.patch | 64 +++++++++++++++++++++ gcc.spec | 10 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 0337-Reduce-ipa-inline-warning-output.patch diff --git a/0337-Reduce-ipa-inline-warning-output.patch b/0337-Reduce-ipa-inline-warning-output.patch new file mode 100644 index 0000000..eac074f --- /dev/null +++ b/0337-Reduce-ipa-inline-warning-output.patch @@ -0,0 +1,64 @@ +From 9a03e44a2c3b7733a23b4ae6b722b4fd48167a92 Mon Sep 17 00:00:00 2001 +From: huang-xiaoquan +Date: Wed, 12 Feb 2025 15:27:57 +0800 +Subject: [PATCH] Reduce ipa-inline warning output. + +--- + gcc/ipa-inline.cc | 34 ---------------------------------- + 1 file changed, 34 deletions(-) + +diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc +index 8d5cc9a84..fd47940cf 100644 +--- a/gcc/ipa-inline.cc ++++ b/gcc/ipa-inline.cc +@@ -225,38 +225,6 @@ caller_growth_limits (struct cgraph_edge *e) + return true; + } + +-/* Warn and prompt the user, and output only once for the file pair where +- the function is located. */ +- +-static void +-prompt_inline_failed_target_option_reason (struct cgraph_edge *e) +-{ +- static std::set> address_pair_set; +- if (e->inline_failed == CIF_TARGET_OPTION_MISMATCH +- && !cl_target_option_eq_major (target_opts_for_fn (e->caller->decl), +- target_opts_for_fn (e->callee->ultimate_alias_target ()->decl)) +- && e->caller->lto_file_data +- && e->callee->ultimate_alias_target ()->lto_file_data) +- { +- std::pair addr_pair +- = std::make_pair (&e->caller->lto_file_data, +- &e->callee->ultimate_alias_target ()->lto_file_data); +- if (address_pair_set.find (addr_pair) != address_pair_set.end ()) +- return; +- +- address_pair_set.insert (addr_pair); +- warning (0, "LTO objects caller in: %s, callee in: %s, not inlinable: %s." +- " Try to use -finline-force=callee_object_or_lib_name to force " +- "inline", e->caller->lto_file_data->file_name, +- e->callee->ultimate_alias_target ()->lto_file_data->file_name, +- cgraph_inline_failed_string (CIF_TARGET_OPTION_MISMATCH)); +- +- cl_target_option_print_diff +- (stderr, 2, target_opts_for_fn (e->caller->decl), +- target_opts_for_fn (e->callee->ultimate_alias_target ()->decl)); +- } +-} +- + /* Dump info about why inlining has failed. */ + + static void +@@ -289,8 +257,6 @@ report_inline_failed_reason (struct cgraph_edge *e) + (dump_file, 2, opts_for_fn (e->caller->decl), + opts_for_fn (e->callee->ultimate_alias_target ()->decl)); + } +- +- prompt_inline_failed_target_option_reason (e); + } + + /* Decide whether sanitizer-related attributes allow inlining. */ +-- +2.33.0 + diff --git a/gcc.spec b/gcc.spec index 3d4012b..1a8e1e7 100644 --- a/gcc.spec +++ b/gcc.spec @@ -2,7 +2,7 @@ %global gcc_major 12 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 68 +%global gcc_release 69 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 @@ -442,6 +442,7 @@ Patch333: 0333-CSPGO-Update-the-gate-of-cspgo.patch Patch334: 0334-Dont-use-local_detect_cpu-when-cross-build.patch Patch335: 0335-fix-costs-for-hip09.patch Patch336: 0336-sfc-Add-struct-static-field-compression-optimization.patch +Patch337: 0337-Reduce-ipa-inline-warning-output.patch # Part 1001-1999 %ifarch sw_64 @@ -1564,6 +1565,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch -P334 -p1 %patch -P335 -p1 %patch -P336 -p1 +%patch -P337 -p1 %ifarch sw_64 %patch -P1001 -p1 @@ -4191,6 +4193,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Wed Feb 12 2025 huang-xiaoquan - 12.3.1-69 +- Type:Bugfix +- ID:NA +- SUG:NA +- DESC:Reduce ipa-inline warning output. + * Mon Feb 10 2025 huzife <634763349@qq.com> - 12.3.1-68 - Type:Sync - ID:NA -- Gitee