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.
Bootstrap & regtest running on x86_64-unknown-linux-gnu, will push
if that succeeds.
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 | 1 -
1 file changed, 1 deletion(-)
diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc
index 5024e488692..af94e5e3b74 100644
--- a/gcc/ipa-pure-const.cc
+++ b/gcc/ipa-pure-const.cc
@@ -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)
--
2.51.0