postpone introduction of access relations
commit537f1cf017f0e3c1720c198475de3ec95bb195a4
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 2 Apr 2014 14:07:36 +0000 (2 16:07 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 20 Jun 2014 15:11:17 +0000 (20 17:11 +0200)
tree3dee9e9778c344c168063811136ec347e8f0ffc4
parent26d1b7616fb0897560f08409042868c8fdac8a3c
postpone introduction of access relations

When index expressions were introduced in dbee8c4 (keep track of index
expressions, Mon Jun 17 14:26:28 2013 +0200), we kept the access relations
even though they are often identical to the corresponding index expressions.
Part of the motivation for keeping the access relations was that the
index expressions and access relations were expected to diverge more
when we start keeping track of which elements of an array are accessed
by a function call.  However, as we will see in later commits, to keep
track of which elements are accessed by a function call, we need three
access relations.  It seems excessive to keep track of three access
relations on each access if they are often going to all be equal
to the index expression.  Instead, we now only keep track of
an explicit access relation (and in future multiple access relations)
if this/these access relation(s) may be different from the index expression.

The access relation can be created from the index expression whenever
it is needed.  Since the index expression may sometimes refer to
an entire slice of an array, we also keep track of an array depth
such that the access relation can be created in the correct space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
157 files changed:
emit.c
expr.c
expr.h
expr_arg.c
nest.c
parse.c
tests/QR.scop
tests/arg.scop
tests/array.scop
tests/assume.scop
tests/assume2.scop
tests/autodetect/decl.scop
tests/autodetect/if1.scop
tests/autodetect/if2.scop
tests/autodetect/if3.scop
tests/autodetect/loop1.scop
tests/autodetect/loop2.scop
tests/autodetect/loop3.scop
tests/autodetect/loop4.scop
tests/autodetect/loop5.scop
tests/autodetect/scalar.scop
tests/autodetect/while.scop
tests/boolean.scop
tests/break.scop
tests/break2.scop
tests/break3.scop
tests/break4.scop
tests/break5.scop
tests/break6.scop
tests/break7.scop
tests/cast.scop
tests/ceild.scop
tests/conditional_assignment.scop
tests/conditional_assignment2.scop
tests/continue.scop
tests/continue2.scop
tests/continue3.scop
tests/continue4.scop
tests/continue5.scop
tests/cuervo.scop
tests/data_dependent.scop
tests/data_dependent2.scop
tests/dec.scop
tests/dec2.scop
tests/dec3.scop
tests/dec4.scop
tests/decl.scop
tests/decl2.scop
tests/decl3.scop
tests/div_mod.scop
tests/dynamic_bound.scop
tests/dynamic_condition.scop
tests/empty_domain.scop
tests/encapsulate/dynamic_condition.scop
tests/encapsulate/for_while.scop
tests/encapsulate/independent5.scop
tests/encapsulate/inf_break.scop
tests/encapsulate/loop7.scop
tests/encapsulate/while.scop
tests/encapsulate/while_affine.scop
tests/enum.scop
tests/filter.scop
tests/filter2.scop
tests/filter3.scop
tests/float.scop
tests/float2.scop
tests/floord.scop
tests/floord2.scop
tests/for_while.scop
tests/for_while_dec.scop
tests/for_while_inc.scop
tests/for_while_inc2.scop
tests/for_while_inc3.scop
tests/for_while_inc4.scop
tests/for_while_init.scop
tests/for_while_init2.scop
tests/for_while_init3.scop
tests/for_while_overflow.scop
tests/for_while_unsigned.scop
tests/for_while_unsigned2.scop
tests/forward_substitution1.scop
tests/forward_substitution2.scop
tests/forward_substitution3.scop
tests/forward_substitution4.scop
tests/forward_substitution5.scop
tests/generic_condition.scop
tests/generic_condition2.scop
tests/if1.scop
tests/if2.scop
tests/implicit_condition.scop
tests/inc.scop
tests/inc2.scop
tests/inc3.scop
tests/inc4.scop
tests/inc5.scop
tests/independent1.scop
tests/independent2.scop
tests/independent3.scop
tests/independent4.scop
tests/inf.scop
tests/inf2.scop
tests/inf3.scop
tests/inf4.scop
tests/iterator_declaration.scop
tests/label.scop
tests/loop.scop
tests/loop2.scop
tests/loop3.scop
tests/loop4.scop
tests/loop5.scop
tests/loop6.scop
tests/loop7.scop
tests/loop8.scop
tests/loop_body.scop
tests/loop_body2.scop
tests/matmul.scop
tests/max.scop
tests/min.scop
tests/min2.scop
tests/mod.scop
tests/mod2.scop
tests/omega.scop
tests/piecewise.scop
tests/piecewise2.scop
tests/propagate.scop
tests/quasi_affine.scop
tests/scalar.scop
tests/scalar_inc.scop
tests/shortcut1.scop
tests/shortcut2.scop
tests/static.scop
tests/struct1.scop
tests/struct10.scop
tests/struct11.scop
tests/struct2.scop
tests/struct3.scop
tests/struct4.scop
tests/struct5.scop
tests/struct6.scop
tests/struct7.scop
tests/struct8.scop
tests/struct9.scop
tests/ternary.scop
tests/tobi1.scop
tests/tobi2.scop
tests/unsigned1.scop
tests/unsigned2.scop
tests/unsigned3.scop
tests/unsigned_break1.scop
tests/unsigned_break2.scop
tests/wdp.scop
tests/while.scop
tests/while_affine.scop
tests/while_break.scop
tests/while_break2.scop
tests/while_inc.scop
tests/while_overflow.scop