Add an AST expression representing the &-operator
This patch adds the C-style "address of" operator (a.k.a. reference
operator) to the AST expressions. It is only applicable to access
expressions and is supposed to yield the address of the access.
Applied to an access such as "A[i + c - 1]" (namely "&A[i + c - 1]") the
address-of operator should yield the same result as the explicit
computation of the address, namely "A + (i + c - 1)".
This allows users to construct a single AST expression from several isl
generated AST expressions, with this single AST expression involving
addresses of accessed array elements. Such single AST expressions may be
easier to convert to other representations than having to convert each
isl generated AST expression separately and then combining them in the
this other representation.
In particular, this is useful for constructing aliasing checks in Polly where
it is easier to construct the check as an isl AST expression than it is to do
the same after conversion to LLVM IR. Also, taking the address of an accessed
element is preferred to pointer arithmetic because a straightforward
translation into IR results in simpler code.
Signed-off-by: Johannes Doerfert <doerfert@cs.uni-saarland.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>