diff options
author | Frederik Harwath <frederik@codesourcery.com> | 2021-11-16 16:15:08 +0100 |
---|---|---|
committer | Kwok Cheung Yeung <kcy@codesourcery.com> | 2023-05-12 19:13:48 +0100 |
commit | 1a9d5c46c01d4481767832973a55220dd422a0b9 (patch) | |
tree | 1b7a639c08295b94744dc06be62799a3c13f9ecb /gcc/graphite.cc | |
parent | 3a9a5bcde0498cba13c8a7c898a97a34470baded (diff) | |
download | gcc-1a9d5c46c01d4481767832973a55220dd422a0b9.zip gcc-1a9d5c46c01d4481767832973a55220dd422a0b9.tar.gz gcc-1a9d5c46c01d4481767832973a55220dd422a0b9.tar.bz2 |
graphite: Add runtime alias checking
Graphite rejects a SCoP if it contains a pair of data references for
which it cannot determine statically if they may alias. This happens
very often, for instance in C code which does not use explicit
"restrict". This commit adds the possibility to analyze a SCoP
nevertheless and perform an alias check at runtime. Then, if aliasing
is detected, the execution will fall back to the unoptimized SCoP.
TODO This needs more testing on non-OpenACC code.
gcc/ChangeLog:
* common.opt: Add fgraphite-runtime-alias-checks.
* graphite-isl-ast-to-gimple.cc
(generate_alias_cond): New function.
(graphite_regenerate_ast_isl): Use from here.
* graphite-poly.cc (new_scop): Create unhandled_alias_ddrs vec ...
(free_scop): and release here.
* graphite-scop-detection.cc (dr_defs_outside_region): New function.
(dr_well_analyzed_for_runtime_alias_check_p): New function.
(graphite_runtime_alias_check_p): New function.
(build_alias_set): Record unhandled alias ddrs for later alias check
creation if flag_graphite_runtime_alias_checks is true instead
of failing.
* graphite.h (struct scop): Add field unhandled_alias_ddrs.
* sese.h (has_operands_from_region_p): New function.
gcc/testsuite/ChangeLog:
* gcc.dg/graphite/alias-1.c: New test.
Diffstat (limited to 'gcc/graphite.cc')
0 files changed, 0 insertions, 0 deletions