]> gcc.gnu.org Git - gcc.git/commit
[go: nahoru, domu]

tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal
authorRichard Biener <rguenther@suse.de>
Mon, 11 Mar 2024 10:17:32 +0000 (11:17 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 16 May 2024 12:44:17 +0000 (14:44 +0200)
commitf3e5f4c58591f5dacdd14a65ec47bbe310df02a0
tree1dff951489618fa4702979b704dd7a9d3ca64baa
parenta9251ab3c91c8c559d0306838575a666ae62dff4
tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal

Now that we handle pt.null conservatively we can implement the missing
tracking of constant pool entries (aka STRING_CST) and handle
ptr-ptr compares using points-to info in ptrs_compare_unequal.

PR tree-optimization/13962
PR tree-optimization/96564
* tree-ssa-alias.h (pt_solution::const_pool): New flag.
* tree-ssa-alias.cc (ptrs_compare_unequal): Handle pointer-pointer
compares.
(dump_points_to_solution): Dump the const_pool flag, fix guard
of flag dumping.
* gimple-pretty-print.cc (pp_points_to_solution): Likewise.
* tree-ssa-structalias.cc (find_what_var_points_to): Set
the const_pool flag for STRING.
(pt_solution_ior_into): Handle the const_pool flag.
(ipa_escaped_pt): Initialize it.

* gcc.dg/tree-ssa/alias-39.c: New testcase.
* g++.dg/vect/pr68145.cc: Use -fno-tree-pta to avoid UB
to manifest in transforms no longer vectorizing this testcase
for an ICE.
gcc/gimple-pretty-print.cc
gcc/testsuite/g++.dg/vect/pr68145.cc
gcc/testsuite/gcc.dg/tree-ssa/alias-39.c [new file with mode: 0644]
gcc/tree-ssa-alias.cc
gcc/tree-ssa-alias.h
gcc/tree-ssa-structalias.cc
This page took 0.06467 seconds and 6 git commands to generate.