pet_context_evaluate_expr: also plug in affine expressions for scalar reads
commitc0db3358d6ecaffec71c08a08e9e116ab548a25b
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 11 Mar 2014 13:20:05 +0000 (11 14:20 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 25 Mar 2014 13:36:28 +0000 (25 14:36 +0100)
treed8a9b98616811793aa143e03d0884d9b8b915d7c
parent9b148553289d861a8f8b93a3d8b7c0f853d31bcb
pet_context_evaluate_expr: also plug in affine expressions for scalar reads

Whenever we access an outer loop iterator, this access is converted
to an access to an iteration domain dimension inside pet_scop_embed
when the scop that is begin built from the bottom up is embedded
in the corresponding loop.

When we change the extraction of a pet_scop from a pet_tree
from a bottom-up process to a top-down process, this special
handling of loop iterators is removed, but we still need to
convert those accesses.  We therefore convert them in advance
inside pet_context_evaluate_expr.  This currently converts
those accesses to parameters that are then later converted
to accesses to iteration domain dimensions (again inside
pet_scop_embed), but when we perform the switch, they
will be converted directly inside pet_context_evaluate_expr.

As a side effect of this change in treatment, we also plug in
affine expressions for accesses to scalar variables that are not
loop iterators.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
context.c
tests/autodetect/decl.scop
tests/cast.scop
tests/forward_substitution1.scop
tests/forward_substitution3.scop
tests/inc5.scop
tests/quasi_affine.scop