ScopLib: Support negated access functions.

Scoplib only supports access functions, but not the more generic
access relations. This commit now also supports access functions
that where not directly expresses as A[sub] with sub = i + 5b,
but with A[sub] with -sub = -i + (-5b).

Test case to come.

Contributed by: Dustin Feld <d3.feld@gmail.com>

llvm-svn: 165379
This commit is contained in:
Tobias Grosser 2012-10-07 17:43:23 +00:00
parent f6e6980280
commit 6a2617b874
1 changed files with 3 additions and 2 deletions

View File

@ -372,8 +372,9 @@ int ScopLib::accessToMatrix_constraint(isl_constraint *c, void *user) {
// The access dimension has to be one.
isl_constraint_get_coefficient(c, isl_dim_out, 0, &v);
assert(isl_int_is_one(v));
bool inverse = true ;
assert((isl_int_is_one(v) || isl_int_is_negone(v))
&& "Access relations not supported in scoplib");
bool inverse = isl_int_is_one(v);
// Assign variables
for (int i = 0; i < nb_in; ++i) {