aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2023-06-20 18:15:22 +0200
committerMartin Jambor <mjambor@suse.cz>2023-06-20 18:16:29 +0200
commit0be3a051c03965c5c0385b783837154902bc08fa (patch)
treeab71cb137ec055ff56aa2844db78cb81597fdc6a /libcpp
parent7f986e2ed9323099bf142756d282002baa869289 (diff)
downloadgcc-0be3a051c03965c5c0385b783837154902bc08fa.zip
gcc-0be3a051c03965c5c0385b783837154902bc08fa.tar.gz
gcc-0be3a051c03965c5c0385b783837154902bc08fa.tar.bz2
ipa-sra: Disable candidates with no known callers (PR 110276)
In IPA-SRA we use can_be_local_p () predicate rather than just plain local call graph flag in order to figure out whether the node is a part of an external API that we cannot change. Although there are cases where this can allow more transformations, it also means we can analyze functions which have no callers at all, which is pointless. Moreover, it makes an assert of hint propagation trigger, which checks that we have looked at callers before processing hints that come from them. This has been reported as PR 110276. This patch simply adds a check that a node has at least one caller into the early checks and makes the node a non-candidate for any transformation if it does not. gcc/ChangeLog: 2023-06-16 Martin Jambor <mjambor@suse.cz> PR ipa/110276 * ipa-sra.cc (struct caller_issues): New field there_is_one. (check_for_caller_issues): Set it. (check_all_callers_for_issues): Check it. gcc/testsuite/ChangeLog: 2023-06-16 Martin Jambor <mjambor@suse.cz> PR ipa/110276 * gcc.dg/ipa/pr110276.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions