aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.cc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2022-12-14 19:01:11 +0100
committerMartin Jambor <mjambor@suse.cz>2022-12-14 19:08:49 +0100
commit6539bbc14836b8e0fa08944be2c069b58bed9455 (patch)
tree8ba85336d97cc0091725697dc5e5812a907ee73f /gcc/gcov.cc
parent1eee94d351774cdc2efc8ee508b82d065184c6ee (diff)
downloadgcc-6539bbc14836b8e0fa08944be2c069b58bed9455.zip
gcc-6539bbc14836b8e0fa08944be2c069b58bed9455.tar.gz
gcc-6539bbc14836b8e0fa08944be2c069b58bed9455.tar.bz2
ipa-sra: Fix address escape case when detecting Fortran descriptors
The discussion about scan_expr_access in ipa-sra.cc brought my attention to a missing case of handling an ADDR_EXPR. As the added testcase shows, the heuristics which looks for parameters which are local variables that are only written to and passed by reference in calls can miss a case where the address of the variable in question is stored elsewhere in an assignment. This patch adds that case to the function and also adds the optimization that Richi suggested, i.e. bailing out early on simple SSA_NAMEs and constant trees. gcc/ChangeLog: 2022-12-14 Martin Jambor <mjambor@suse.cz> * ipa-sra.cc (loaded_decls): Adjust comment. (scan_expr_access): Also detect assignments of address of local variables to a variable. Bail out early on SSA_NAMEs and constants as an optimization. gcc/testsuite/ChangeLog: 2022-12-14 Martin Jambor <mjambor@suse.cz> * gcc.dg/ipa/ipa-sra-29.c: New test.
Diffstat (limited to 'gcc/gcov.cc')
0 files changed, 0 insertions, 0 deletions