Some comments about the patch
This is a full fledged function marked static and put into a header file which is other than that pretty much useless.
I really want to get rid of it.
We might consider to move to this interface and do some actual computation on the parametric loop trip counts instead of limiting ourselfs to integer loop trip counts... often the LLVM vectorizer does not vectorize loops even if they are annotated parallel and have a few simple load-binop-store chains (e.g., bicg when it's parallelized in the outer most dimension and therefore doesn't have a reduction in the innermost loop any more [due to privatization to be exact]).
We might want to put stuff like this [also createAff, createPwAff, etc] into isl to ease handling.
This function will also be used to determine the number of privatization locations needed.
This will probably be easier from within isl.
Lnt shows that sometimes it is very costly to compute the loop bounds. So I figure we cannot compute it for every loop but only on demand.
However, we need a fast way to compute hasAtLeastOneIteration(isl_ast_node *For). Any thoughts?