aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2020-04-14 19:26:04 +0200
committerMartin Jambor <mjambor@suse.cz>2020-04-14 19:26:39 +0200
commit9707b593f88041e74e5cf5640ec64fea13a0387c (patch)
tree1642b3088f3e1327f239571eac927f38f861eda6 /gcc/c
parentb256222910cfa4a9b2b477dff8954e51fdc36bb9 (diff)
downloadgcc-9707b593f88041e74e5cf5640ec64fea13a0387c.zip
gcc-9707b593f88041e74e5cf5640ec64fea13a0387c.tar.gz
gcc-9707b593f88041e74e5cf5640ec64fea13a0387c.tar.bz2
ipa-sra: Fix treatment of internal functions (PR 94434)
IPA-SRA can segfault when processing a call to an internal function because such calls do not have corresponding call graphs and should be treated like memory accesses anyway, which what the patch below does. The patch makes an attempt to differentiate between reads and writes, although for things passed by value it does not make any difference. It treats all arguments of functions denoted with internal_store_fn_p as written to, even though in practice only some are, but for IPA-SRA purposes, actions needed to be taken when processing a read are also always performed when analyzing a write, so the code is just slightly pessimistic. But not as pessimistic as bailing out on any internal call immediately. I have LTO bootstrapped and tested the patch on x86_64-linux and normally bootstrapped and tested it on aarch64-linux, although one which is not SVE capable. I would appreciate testing on such machine too - as well as a small testcase that would follow all relevant conventions in gcc.target/aarch64/sve. 2020-04-14 Martin Jambor <mjambor@suse.cz> PR ipa/94434 * ipa-sra.c: Include internal-fn.h. (enum isra_scan_context): Update comment. (scan_function): Treat calls to internal_functions like loads or stores.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions