]> git.ipfire.org Git - thirdparty/gcc.git/commit
graphite: Adjust scop loop-nest choice
authorFrederik Harwath <frederik@codesourcery.com>
Tue, 16 Nov 2021 15:21:57 +0000 (16:21 +0100)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:54 +0000 (14:11 +0100)
commitb1e894b815ebf8d8a757cf324c93f17582b62b86
tree8cb29a0c581dad236c2ca4e02a2614ec0c4aec26
parentcda804467466dc8e55f3e2d8e0a7f1c1ab700c52
graphite: Adjust scop loop-nest choice

The find_common_loop function is used in Graphite to obtain a common
super-loop of all loops inside a SCoP.  The function is applied to the
loop of the destination block of the edge that leads into the SESE
region and the loop of the source block of the edge that exits the
region.  The exit block is usually introduced by the canonicalization
of the loop structure that Graphite does to support its code
generation. If it is empty, it may happen that it belongs to the outer
fake loop.  This way, build_alias_set may end up analysing
data-references with respect to this loop although there may exist a
proper super-loop of the SCoP loops.  This does not seem to be correct
in general and it leads to problems with runtime alias check creation
which fails if executed on a loop without niter information.

gcc/ChangeLog:

        * graphite-scop-detection.cc (scop_context_loop): New function.
        (build_alias_set): Use scop_context_loop instead of find_common_loop.
        * graphite-isl-ast-to-gimple.cc (graphite_regenerate_ast_isl): Likewise.
        * graphite.h (scop_context_loop): New declaration.
gcc/ChangeLog.omp
gcc/graphite-isl-ast-to-gimple.cc
gcc/graphite-scop-detection.cc
gcc/graphite.h