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.