[PATCH] D39453: [SCEV] Strengthen variance condition in calculateLoopDisposition

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 15:58:11 PST 2017


reames added a comment.

Max, I don't quite follow your discussion enough to know for sure, but I suspect there's something wrong with your framing here.  A induction variable in one loop may be loop invariant with respect to sibling loop.  That's normal.  Is there maybe a subcase here?  Or are you looking at flawed assumption in caller code?

int i;
for (i = 0; i < N; i++) { /* i is variant, j is undefined here */ }
for (int j = 0; j < M; j++) {/* i is invariant, j is varying. */ }


https://reviews.llvm.org/D39453





More information about the llvm-commits mailing list