aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-03-11 11:17:32 +0100
committerRichard Biener <rguenther@suse.de>2024-05-16 14:44:17 +0200
commitf3e5f4c58591f5dacdd14a65ec47bbe310df02a0 (patch)
tree1dff951489618fa4702979b704dd7a9d3ca64baa /gcc/tree-ssa-alias.h
parenta9251ab3c91c8c559d0306838575a666ae62dff4 (diff)
downloadgcc-f3e5f4c58591f5dacdd14a65ec47bbe310df02a0.zip
gcc-f3e5f4c58591f5dacdd14a65ec47bbe310df02a0.tar.gz
gcc-f3e5f4c58591f5dacdd14a65ec47bbe310df02a0.tar.bz2
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.
Diffstat (limited to 'gcc/tree-ssa-alias.h')
-rw-r--r--gcc/tree-ssa-alias.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.h b/gcc/tree-ssa-alias.h
index b26fffe..e29dff5 100644
--- a/gcc/tree-ssa-alias.h
+++ b/gcc/tree-ssa-alias.h
@@ -47,6 +47,11 @@ struct GTY(()) pt_solution
includes memory at address NULL. */
unsigned int null : 1;
+ /* Nonzero if the points-to set includes a readonly object like a
+ STRING_CST that does not have an underlying declaration but will
+ end up in the constant pool. */
+ unsigned int const_pool : 1;
+
/* Nonzero if the vars bitmap includes a variable included in 'nonlocal'. */
unsigned int vars_contains_nonlocal : 1;
/* Nonzero if the vars bitmap includes a variable included in 'escaped'. */