[PATCH] D11725: [DependenceAnalysis] Ensure All Recurrences are Affine
Sanjin Sijaric via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 12:30:33 PDT 2015
ssijaric added a comment.
In http://reviews.llvm.org/D11725#233066, @mssimpso wrote:
> Sanjin,
>
> What do you think about adding an isAffineRecursive() along side isAffine() in SCEVAddRecExpr? Would that work for you? But doesn't Polly's SCEVValidator already walk the entire expression to check this?
Thanks, Matthew. That will work.
Polly didn't call SCEVValidator via isAffineExpr where the error occurs - it seems to rely on SCEVAddRecExpr::computeAccessFunctions to bail out if the expression is not affine. SCEVAddRecExpr::computeAccessFunctions has the following check at the start:
void SCEVAddRecExpr::computeAccessFunctions(
ScalarEvolution &SE, SmallVectorImpl<const SCEV *> &Subscripts,
SmallVectorImpl<const SCEV *> &Sizes) const {
// Early exit in case this SCEV is not an affine multivariate function.
if (Sizes.empty() || !this->isAffine())
return;
....
...
Would it be valid to change !this->isAffine() to !this->isAffineRecursive() ?
http://reviews.llvm.org/D11725
More information about the llvm-commits
mailing list