middle-end/38474 - fix alias walk budget accounting in IPA analysis
authorRichard Biener <rguenther@suse.de>
Fri, 12 Feb 2021 10:13:36 +0000 (11:13 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 12 Feb 2021 11:34:28 +0000 (12:34 +0100)
commit6cc886bf4279461b8931c4ca544185a85cd69f26
tree2cbecc9e245890f234cb1a7f6b4b3e49d7fa3a27
parentbc6087c57540bfdcde533bc90197b6553fb8003c
middle-end/38474 - fix alias walk budget accounting in IPA analysis

The walk_aliased_vdef calls do not update the walking budget until
it is hit by a single call (and then in one case it resumes with
no limit at all).  The following rectifies this in multiple places.
It also makes the updates more consistend and fixes
determine_known_aggregate_parts to account its own alias queries.

2021-02-12  Richard Biener  <rguenther@suse.de>

PR middle-end/38474
* ipa-fnsummary.c (unmodified_parm_1): Only walk when
fbi->aa_walk_budget is bigger than zero.  Update
fbi->aa_walk_budget.
(param_change_prob): Likewise.
* ipa-prop.c (detect_type_change_from_memory_writes):
Properly account walk_aliased_vdefs.
(parm_preserved_before_stmt_p): Canonicalize updates.
(parm_ref_data_preserved_p): Likewise.
(parm_ref_data_pass_through_p): Likewise.
(determine_known_aggregate_parts): Account own alias queries.
gcc/ipa-fnsummary.c
gcc/ipa-prop.c