aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2022-11-22 18:22:03 +0100
committerMartin Jambor <mjambor@suse.cz>2022-11-22 18:28:44 +0100
commitc4a92a9117a034e7cf291ae51d8b9b844fb5a88b (patch)
tree79d3a5576878f91a4f881e3c6085adc773e7fa23 /libcpp
parentd6bbca7b78745915d98bb1324d79de6a1e6dc801 (diff)
downloadgcc-c4a92a9117a034e7cf291ae51d8b9b844fb5a88b.zip
gcc-c4a92a9117a034e7cf291ae51d8b9b844fb5a88b.tar.gz
gcc-c4a92a9117a034e7cf291ae51d8b9b844fb5a88b.tar.bz2
ipa-cp: Do not be too optimistic about self-recursive edges (PR 107661)
PR 107661 shows that function push_agg_values_for_index_from_edge should not attempt to optimize self-recursive call graph edges when called from cgraph_edge_brings_all_agg_vals_for_node. Unlike when being called from find_aggregate_values_for_callers_subset, we cannot expect that any cloning for constants would lead to the edge leading from a new clone to the same new clone, in this case it would only be redirected to a new callee. Fixed by adding a parameter to push_agg_values_from_edge whether being optimistic about self-recursive edges is possible. gcc/ChangeLog: 2022-11-22 Martin Jambor <mjambor@suse.cz> PR ipa/107661 * ipa-cp.cc (push_agg_values_from_edge): New parameter optimize_self_recursion, use it to decide whether to pass interim to the helper function. (find_aggregate_values_for_callers_subset): Pass true in the new parameter of push_agg_values_from_edge. (cgraph_edge_brings_all_agg_vals_for_node): Pass false in the new parameter of push_agg_values_from_edge. gcc/testsuite/ChangeLog: 2022-11-22 Martin Jambor <mjambor@suse.cz> PR ipa/107661 * g++.dg/ipa/pr107661.C: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions