aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-04-18 11:49:48 +0200
committerRichard Biener <rguenther@suse.de>2023-04-18 14:37:18 +0200
commitfdbaab2dc886f78a1e75512eeee0faa17e77c862 (patch)
tree52e624137f67c8f49857d3ffe1273cfe643ebc94 /gcc/ada/gcc-interface/utils.cc
parentcb5c71d16d0fb47638498365f5c857ce7c673eaf (diff)
downloadgcc-fdbaab2dc886f78a1e75512eeee0faa17e77c862.zip
gcc-fdbaab2dc886f78a1e75512eeee0faa17e77c862.tar.gz
gcc-fdbaab2dc886f78a1e75512eeee0faa17e77c862.tar.bz2
tree-optimization/109539 - restrict PHI handling in access diagnostics
Access diagnostics visits the SSA def-use chains to diagnose things like dangling pointer uses. When that runs into PHIs it tries to prove all incoming pointers of which one is the currently visited use are related to decide whether to keep looking for the PHI def uses. That turns out to be overly optimistic and thus costly. The following scraps the existing handling for simply requiring that we eventually visit all incoming pointers of the PHI during the def-use chain analysis and only then process uses of the PHI def. Note this handles backedges of natural loops optimistically, diagnosing the first iteration. There's gcc.dg/Wuse-after-free-2.c containing a testcase requiring this. PR tree-optimization/109539 * gimple-ssa-warn-access.cc (pass_waccess::check_pointer_uses): Re-implement pointer relatedness for PHIs.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
0 files changed, 0 insertions, 0 deletions