aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/line-map.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2021-10-31 23:14:29 +0100
committerJan Hubicka <hubicka@ucw.cz>2021-10-31 23:14:29 +0100
commitca84f39399fda80c770306465276ffd66d3766ed (patch)
tree6bb38a6cd317c43716c251388b7aa9b10c5302b8 /libcpp/include/line-map.h
parentd41092ec52f46d2f4b08fff8d1519e50354331b0 (diff)
downloadgcc-ca84f39399fda80c770306465276ffd66d3766ed.zip
gcc-ca84f39399fda80c770306465276ffd66d3766ed.tar.gz
gcc-ca84f39399fda80c770306465276ffd66d3766ed.tar.bz2
Improve handling of return slot in ipa-pure-const and modref.
while preparing testcase for return slot tracking I noticed that both ipa-pure-const and modref treat return slot writes as non-local which prevents detecting functions as pure or not modifying global state. Fixed by making points_to_local_or_readonly_memory_p to special case return slot. This is bit of a side case, but presently at all uses of points_to_local_or_readonly_memory_p we want to handle return slot this way. I also noticed that we handle gimple copy unnecesarily pesimistically. This does not make difference right now since we do no not track non-scalars, but I fixed it anyway. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: * ipa-fnsummary.c: Include tree-dfa.h. (points_to_local_or_readonly_memory_p): Return true on return slot writes. * ipa-modref.c (analyze_ssa_name_flags): Fix handling of copy statement. gcc/testsuite/ChangeLog: * g++.dg/ipa/modref-1.C: New test.
Diffstat (limited to 'libcpp/include/line-map.h')
0 files changed, 0 insertions, 0 deletions