aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-09-26 08:12:44 +0200
committerJan Hubicka <jh@suse.cz>2020-09-26 08:12:44 +0200
commitb89e4559950c79d8933013305c19d7014a39cdb1 (patch)
treeb669a4d78420aed0632b161bf8ff2cb1cead65c8 /libcpp
parent5a90a18668fef8d51e5b3fe9f69123f53cbd8f25 (diff)
downloadgcc-b89e4559950c79d8933013305c19d7014a39cdb1.zip
gcc-b89e4559950c79d8933013305c19d7014a39cdb1.tar.gz
gcc-b89e4559950c79d8933013305c19d7014a39cdb1.tar.bz2
Track arguments pointing to local or readonly memory in ipa-fnsummary
this patch implement tracking wehther argument points to readonly memory. This is is useful for ipa-modref as well as for inline heuristics. It is desirable to inline functions that dereference pointers to local variables in order to support SRA. We always did the oposite heuristics (guessing that the dereferences will be optimized out with 50% probability) but here we could increase the probability for cases where we can track that argument is indeed a local memory (or readonly which is also good) * ipa-fnsummary.c (dump_ipa_call_summary): Dump points_to_local_or_readonly_memory flag. (analyze_function_body): Compute points_to_local_or_readonly_memory flag. (remap_edge_change_prob): Rename to ... (remap_edge_params): ... this one; update points_to_local_or_readonly_memory. (remap_edge_summaries): Update. (read_ipa_call_summary): Stream the new flag. (write_ipa_call_summary): Likewise. * ipa-predicate.h (struct inline_param_summary): Add points_to_local_or_readonly_memory. (inline_param_summary::equal_to): Update. (inline_param_summary::useless_p): Update.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions