[PATCH] D11725: [DependenceAnalysis] Ensure All Recurrences are Affine
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 00:23:15 PDT 2015
sanjoy added a comment.
I have two general questions, only tangentially related to this review (because I'm not familiar with this piece of code):
- What is the difference between `DependenceAnalysis::tryDelinearize` and `ScalarEvolution::delinearize`?
- It looks like `SCEVDivision` bails out on things other than non-affine add recs (e.g. on `SCEVUnknown`s). Why are those okay? IOW, is the failing assert too strong? This is assuming that the only problem with a nested non-affine add rec is that the `SCEVDivision` aborts, are there other problems too?
================
Comment at: include/llvm/Analysis/ScalarEvolutionExpressions.h:320
@@ -319,1 +319,3 @@
+ /// isAffineRecursive - Return true if all SCEVAddRexExprs contained in
+ /// this expression are affine.
----------------
Nit: `SCEVAddRecExprs`
================
Comment at: lib/Analysis/DependenceAnalysis.cpp:3281
@@ -3280,2 +3280,3 @@
const SCEVAddRecExpr *DstAR = dyn_cast<SCEVAddRecExpr>(DstSCEV);
- if (!SrcAR || !DstAR || !SrcAR->isAffine() || !DstAR->isAffine())
+ if (!SrcAR || !DstAR || !SrcAR->isAffineRecursive() ||
+ !DstAR->isAffineRecursive())
----------------
Why not move this check to `ScalarEvolution::computeAccessFunctions`?
http://reviews.llvm.org/D11725
More information about the llvm-commits
mailing list