diff options
author | Jan Hubicka <jh@suse.cz> | 2021-11-13 22:25:23 +0100 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2021-11-13 22:25:23 +0100 |
commit | 5aa91072e24c1e16a5ec641b48b64c9c9f199f13 (patch) | |
tree | 087583429b1e19e850beb66efc26633cafdf5f82 /gcc/tree-ssa-alias.c | |
parent | af47f22fd5784a363ea78c419898b5d703761fb7 (diff) | |
download | gcc-5aa91072e24c1e16a5ec641b48b64c9c9f199f13.zip gcc-5aa91072e24c1e16a5ec641b48b64c9c9f199f13.tar.gz gcc-5aa91072e24c1e16a5ec641b48b64c9c9f199f13.tar.bz2 |
Implement DSE of dead functions calls storing memory.
gcc/ChangeLog:
2021-11-13 Jan Hubicka <hubicka@ucw.cz>
* ipa-modref.c (modref_summary::modref_summary): Clear new flags.
(modref_summary::dump): Dump try_dse.
(modref_summary::finalize): Add FUN attribute; compute try-dse.
(analyze_function): Update.
(read_section): Update.
(update_signature): Update.
(pass_ipa_modref::execute): Update.
* ipa-modref.h (struct modref_summary):
* tree-ssa-alias.c (ao_ref_init_from_ptr_and_range): Export.
* tree-ssa-alias.h (ao_ref_init_from_ptr_and_range): Declare.
* tree-ssa-dse.c (dse_optimize_call): New function.
(dse_optimize_stmt): Use it.
gcc/testsuite/ChangeLog:
2021-11-13 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/cpp1z/inh-ctor23.C: Fix template
* g++.dg/ipa/ipa-icf-4.C: Fix template
* gcc.dg/tree-ssa/modref-dse-1.c: New test.
* gcc.dg/tree-ssa/modref-dse-2.c: New test.
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 17ff6bb..2965902 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -782,7 +782,7 @@ ao_ref_alias_ptr_type (ao_ref *ref) The access is assumed to be only to or after of the pointer target adjusted by the offset, not before it (even in the case RANGE_KNOWN is false). */ -static void +void ao_ref_init_from_ptr_and_range (ao_ref *ref, tree ptr, bool range_known, poly_int64 offset, |