diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2021-11-07 18:20:45 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2021-11-07 18:20:45 +0100 |
commit | f6f704fd104b79fc88914978772737cd05423059 (patch) | |
tree | 39f3fbf1a4711497619b6406f66320e7d76b839c /gcc/function.h | |
parent | a28cfe49203705ff9675b79fce88d6087b11d098 (diff) | |
download | gcc-f6f704fd104b79fc88914978772737cd05423059.zip gcc-f6f704fd104b79fc88914978772737cd05423059.tar.gz gcc-f6f704fd104b79fc88914978772737cd05423059.tar.bz2 |
Fix inter-procedural EAF flags propagation with respect to !binds_to_current_def_p
While proofreading the code for handling EAF flags of !binds_to_current_def_p I
noticed that the interprocedural dataflow actually ignores the flag possibly
introducing wrong code on quite complex interposable functions in non-trivial
recursion cycles (or at ltrans partition boundary).
This patch unifies the flags changes to single place (remove_useless_eaf_flags)
and does extend modref_merge_call_site_flags to do the right thing.
lto-bootstrapped/regtested x86_64-linux. Plan to commit it today after bit
more testing (firefox/clang build).
gcc/ChangeLog:
* gimple.c (gimple_call_arg_flags): Use interposable_eaf_flags.
(gimple_call_retslot_flags): Likewise.
(gimple_call_static_chain_flags): Likewise.
* ipa-modref.c (remove_useless_eaf_flags): Do not remove everything for
NOVOPS.
(modref_summary::useful_p): Likewise.
(modref_summary_lto::useful_p): Likewise.
(analyze_parms): Do not give up on NOVOPS.
(analyze_function): When dumping report chnages in EAF flags
between IPA and local pass.
(modref_merge_call_site_flags): Compute implicit eaf flags
based on callee ecf_flags and fnspec; if the function does not
bind to current defs use interposable_eaf_flags.
(modref_propagate_flags_in_scc): Update.
* ipa-modref.h (interposable_eaf_flags): New function.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions