]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix handling of ICF_NOVOPS in ipa-modref
authorJan Hubicka <hubicka@ucw.cz>
Mon, 22 Jul 2024 21:01:50 +0000 (23:01 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Mon, 22 Jul 2024 21:01:50 +0000 (23:01 +0200)
commitefcbe7b985e24ac002a863afd609c44a67761195
treea0fcbf21bbafab7e5cc5dab5c1b51c8178b955f7
parent6f81b7fa799642a4bfb9912fa756285bea72ce8c
Fix handling of ICF_NOVOPS in ipa-modref

As shown in somewhat convoluted testcase, ipa-modref is mistreating
ECF_NOVOPS as "having no side effects".  This come from time when
modref cared only about memory accesses and thus it was possible to
shortcut on it.

This patch removes (hopefully) all those bad shortcuts.
Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

PR ipa/109985

* ipa-modref.cc (modref_summary::useful_p): Fix handling of ECF_NOVOPS.
(modref_access_analysis::process_fnspec): Likevise.
(modref_access_analysis::analyze_call): Likevise.
(propagate_unknown_call): Likevise.
(modref_propagate_in_scc): Likevise.
(modref_propagate_flags_in_scc): Likewise.
(ipa_merge_modref_summary_after_inlining): Likewise.
gcc/ipa-modref.cc