]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bootstrap/124406 - fix lean LTO profiledboostrap
authorRichard Biener <rguenther@suse.de>
Thu, 12 Mar 2026 12:03:02 +0000 (13:03 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 12 Mar 2026 13:42:16 +0000 (14:42 +0100)
On s390x we are seeing CFG divergence when using the boostrap-lto-lean
config with profiledbootstrap which uses a non-LTO build for
stageprofile and a LTO build for stagefeedback.  This is caused by
local IPA pure-const skipping some analysis only when not doing LTO.

The following removes this divergence.  Proposed by Honza in the PR,
profilebootstrapped with bootstrap-lto-lean on s390x-linux-gnu.

PR bootstrap/124406
* ipa-pure-const.cc (skip_function_for_local_pure_const):
Do not analyze interposable functions when LTO is enabled.

gcc/ipa-pure-const.cc

index 5024e488692fdd3dd0d9e9d1b9e5c4bf7d9944a1..af94e5e3b740f73de90d60a4aef8a99a01addea0 100644 (file)
@@ -1481,7 +1481,6 @@ skip_function_for_local_pure_const (struct cgraph_node *node)
   /* Save some work and do not analyze functions which are interposable and
      do not have any non-interposable aliases.  */
   if (node->get_availability () <= AVAIL_INTERPOSABLE
-      && !flag_lto
       && !node->has_aliases_p ())
     {
       if (dump_file)