push affine conditions into index expressions
commite2df0b3334de8ccfceab439fc73281e246914e6a
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 26 Feb 2016 16:38:22 +0000 (26 17:38 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 7 Mar 2016 11:13:53 +0000 (7 12:13 +0100)
tree03233ce2e615aba1fcc881057bc77de332cc8a9b
parent634aa4c78ec337778b44016ff997980a43ccc2e4
push affine conditions into index expressions

If the code contains an expression of the form

    c ? A[f] : A[g]

with c an affine condition, then replace it by

    A[c ? f : g]

This reduces the number of accesses and, more importantly,
includes the information of when the access is performed
into the index expression.  This allows dependence analysis
to take into account this information, reducing the risk of
introducing spurious dependences.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
context.c
tests/rotate.c [new file with mode: 0644]
tests/rotate.scop [new file with mode: 0644]