[PATCH] D34768: Remove creation of vector to store loop indices

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 06:15:14 PDT 2017


hiraditya abandoned this revision.
hiraditya added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:605
+
+      it += delta;
+
----------------
efriedma wrote:
> This arithmetic is hard to follow... which is why it was written with the vector in the first place.
> 
> If you're really unhappy with memory allocation, maybe try using iterators?  Something like `auto SLRef = makeArrayRef(SL); for (StoreInst *k : concat(SLRef.slice(i+1), reverse(SLRef.slice(0, i - 1))))`
Ok, then I'll abandon this patch.


https://reviews.llvm.org/D34768





More information about the llvm-commits mailing list