Detect EAF flags in ipa-modref
authorJan Hubicka <jh@suse.cz>
Sat, 14 Nov 2020 12:52:36 +0000 (13:52 +0100)
committerJan Hubicka <jh@suse.cz>
Sat, 14 Nov 2020 12:52:36 +0000 (13:52 +0100)
commit520d5ad337eaa15860a5a964daf7ca46cf31c029
tree9d875db97de3265cd0cffe2a2c000dc3eb7ffa53
parent2873c8af66e1248734bb638a49e6bc53f5e45382
Detect EAF flags in ipa-modref

A minimal patch for the EAF flags discovery.  It works only in local ipa-modref
and gives up on cyclic SSA graphs.  It improves pt_solution_includes
disambiguations twice.

gcc/Changelog:

* gimple.c: Include ipa-modref-tree.h and ipa-modref.h.
(gimple_call_arg_flags): Use modref to determine flags.
* ipa-modref.c: Include gimple-ssa.h, tree-phinodes.h,
tree-ssa-operands.h, stringpool.h and tree-ssanames.h.
(analyze_ssa_name_flags): Declare.
(modref_summary::useful_p): Summary is also useful if arg flags are
known.
(dump_eaf_flags): New function.
(modref_summary::dump): Use it.
(get_modref_function_summary): Be read for current_function_decl
being NULL.
(memory_access_to): New function.
(deref_flags): New function.
(call_lhs_flags): New function.
(analyze_parms): New function.
(analyze_function): Use it.
* ipa-modref.h (struct modref_summary): Add arg_flags.
* doc/invoke.texi (ipa-modref-max-depth): Document.
* params.opt (ipa-modref-max-depth): New param.
gcc/doc/invoke.texi
gcc/gimple.c
gcc/ipa-modref.c
gcc/ipa-modref.h
gcc/params.opt