aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2022-06-22 11:27:15 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2022-06-22 11:27:15 +0100
commit038b077689bb5310386b04d40a2cea234f01e6aa (patch)
tree7171bb5b1ab6060b86aef2959504158ac972a7a1 /gcc/doc
parent98b6e62cf5e7d477b5797084da59561f6d018668 (diff)
downloadgcc-038b077689bb5310386b04d40a2cea234f01e6aa.zip
gcc-038b077689bb5310386b04d40a2cea234f01e6aa.tar.gz
gcc-038b077689bb5310386b04d40a2cea234f01e6aa.tar.bz2
data-ref: Improve non-loop disambiguation [PR106019]
When dr_may_alias_p is called without a loop context, it tries to use the tree-affine interface to calculate the difference between the two addresses and use that difference to check whether the gap between the accesses is known at compile time. However, as the example in the PR shows, this doesn't expand SSA_NAMEs and so can easily be defeated by things like reassociation. One fix would have been to use aff_combination_expand to expand the SSA_NAMEs, but we'd then need some way of maintaining the associated cache. This patch instead reuses the innermost_loop_behavior fields (which exist even when no loop context is provided). It might still be useful to do the aff_combination_expand thing too, if an example turns out to need it. gcc/ PR tree-optimization/106019 * tree-data-ref.cc (dr_may_alias_p): Try using the innermost_loop_behavior to disambiguate non-loop queries. gcc/testsuite/ PR tree-optimization/106019 * gcc.dg/vect/bb-slp-pr106019.c: New test.
Diffstat (limited to 'gcc/doc')
0 files changed, 0 insertions, 0 deletions