[PATCH] D22630: Loop rotation
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 14:54:53 PDT 2016
On Thu, Jul 28, 2016 at 2:46 PM, Sanjoy Das via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> After rotating the inner loop, won't the program have to be
>
> for (int i = 0; i < m; ++i) {
> x = A->at(n * i);
> if (exception)
> throw;
> y = B->at(n*i);
> if(exception)
> throw;
> res += x + y;
> for (int j = 1; j < n; ++j) // << changed lower count
> res += A->at(n * i + j) + B->at(n * i + j);
> }
>
> Where is the redundancy here ^?
> <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
If you look at the actual LLVM IR for the original C++ example, you'll see
that some of the checks can be simplified because we can assume B is
dereferencable.
-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160728/f85c902f/attachment.html>
More information about the llvm-commits
mailing list