diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2024-11-17 11:54:10 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2024-11-17 11:54:10 +0100 |
commit | addf02282026cc23d24fc4445b47b408d484d1e7 (patch) | |
tree | 2fefb5285529199520420adfbd265cbf693cbbca /libcpp/include/symtab.h | |
parent | aac5c57ee167230cea466064951daf06e42197b9 (diff) | |
download | gcc-addf02282026cc23d24fc4445b47b408d484d1e7.zip gcc-addf02282026cc23d24fc4445b47b408d484d1e7.tar.gz gcc-addf02282026cc23d24fc4445b47b408d484d1e7.tar.bz2 |
ipa-modref bits for unsequenced and reproducible
C attributes reproducible and unsequenced implies that calling function twice
leads to same effect if parameters are otherwise unchanged (function call
itself does not count). This is bit bit stronger that modref's notion of
nondeterminism that says that same inputs will yield same outputs (function
call itself does count).
This patch makes reproducible/unsequenced imply determinism and cleans up
determinism handling. By itself it is not useful, since we can not make use of it
unless we know what are the inputs/outputs of the function which I plan to handle
by the "fn spec" attribute.
gcc/ChangeLog:
* ipa-modref.cc (modref_summary::useful_p): const/pure implies
determinism.
(modref_summary_lto::useful_p): Likewise.
(ignore_nondeterminism_p): Add CALLEE_FNTYPE parameter; check for
reproducible/unsequenced
(modref_access_analysis::record_access_p): Use ignore_nondeterminism_p
when handling volatile accesses.
(modref_access_analysis::get_access_for_fnspec): Update.
(modref_access_analysis::process_fnspec): Cleanup handling of NOVOPS.
(modref_access_analysis::analyze_call): Use ignore_nondeterminism_p
when handling asm statements.
(modref_access_analysis::analyze_stmt): Update.
(propagate_unknown_call): Update.
(modref_propagate_in_scc): Update.
(ipa_merge_modref_summary_after_inlining): Update.
Diffstat (limited to 'libcpp/include/symtab.h')
0 files changed, 0 insertions, 0 deletions