aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-modref.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2021-11-21 00:35:22 +0100
committerJan Hubicka <jh@suse.cz>2021-11-21 00:35:22 +0100
commita0e99d5bb741d3db74a67d492f47b28217fbf88a (patch)
treef4977c5265e5b8e669205985682fb8819e1ce5a4 /gcc/ipa-modref.c
parent7950c96ca667ddaab9d6e894da3958ebc2e2dccb (diff)
downloadgcc-a0e99d5bb741d3db74a67d492f47b28217fbf88a.zip
gcc-a0e99d5bb741d3db74a67d492f47b28217fbf88a.tar.gz
gcc-a0e99d5bb741d3db74a67d492f47b28217fbf88a.tar.bz2
Fix looping flag discovery in ipa-pure-const
The testcase shows situation where there is non-trivial cycle in the callgraph involving a noreturn call. This cycle is important for const function discovery but not important for pure. IPA pure const uses same strongly connected components for both propagations which makes it to get suboptimal result (does not detect the pure flag). However local pure const gets the situation right becaue it processes functions in right order. This hits rarely executed code in propagate_pure_const that merge results with previously known state that has long standing bug in it that makes it to throw away the looping flag. Bootstrapped/regtested x86_64-linux. gcc/ChangeLog: 2021-11-21 Jan Hubicka <hubicka@ucw.cz> PR ipa/103052 * ipa-pure-const.c (propagate_pure_const): Fix merging of loping flag. gcc/testsuite/ChangeLog: 2021-11-21 Jan Hubicka <hubicka@ucw.cz> PR ipa/103052 * gcc.c-torture/execute/pr103052.c: New test.
Diffstat (limited to 'gcc/ipa-modref.c')
0 files changed, 0 insertions, 0 deletions