aboutsummaryrefslogtreecommitdiff
path: root/libcpp/system.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-03-15 11:41:20 +0100
committerRichard Biener <rguenther@suse.de>2023-03-16 08:30:05 +0100
commitadb70c2d1060b3e8d410b45c698796c5d88818b3 (patch)
tree7867c3888f33b8e87c0d5f4222392592a9fc8881 /libcpp/system.h
parentaf4f68166602938796f34cd4e515cb97f2f113c0 (diff)
downloadgcc-adb70c2d1060b3e8d410b45c698796c5d88818b3.zip
gcc-adb70c2d1060b3e8d410b45c698796c5d88818b3.tar.gz
gcc-adb70c2d1060b3e8d410b45c698796c5d88818b3.tar.bz2
Avoid random stmt order result in pass_waccess::use_after_inval_p
use_after_inval_p uses stmt UIDs to speed up repeated dominance checks within a basic-block but it fails to assign UIDs to PHIs which means compares with PHIs in the same block get a random result. The following factors renumber_gimple_stmt_uids to expose a new renumber_gimple_stmt_uids_in_block we can share. But since we rely on processing even earlier PHIs to follow pointer adjustments (we look at those even if earlier) the patch also moves PHI handling out of the use_after_inval_p guard. This then also fixes PR109141. PR tree-optimization/109141 * tree-dfa.h (renumber_gimple_stmt_uids_in_block): New. * tree-dfa.cc (renumber_gimple_stmt_uids_in_block): Split out from ... (renumber_gimple_stmt_uids): ... here and (renumber_gimple_stmt_uids_in_blocks): ... here. * gimple-ssa-warn-access.cc (pass_waccess::use_after_inval_p): Use renumber_gimple_stmt_uids_in_block to also assign UIDs to PHIs. (pass_waccess::check_pointer_uses): Process all PHIs.
Diffstat (limited to 'libcpp/system.h')
0 files changed, 0 insertions, 0 deletions