Use modref even for nested functions in ref_maybe_used_by_call_p_1
Remove test for function not having call chain guarding modref use in
ref_maybe_used_by_call_p_1. It never made sense since modref treats call chain
accesses explicitly. It was however copied from earlier check for ECF_CONST
(which seems dubious too, but I would like to discuss it independelty).
This enables us to detect that memory pointed to static chain (or parts of it)
are unused by the function.
lto-bootstrapped-regtested all lanugages on x86_64-linux.
gcc/ChangeLog:
2021-11-19 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Do not guard modref
by !gimple_call_chain.
gcc/testsuite/ChangeLog:
2021-11-19 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/tree-ssa/modref-dse-6.c: New test.