This is an archive of the discontinued LLVM Phabricator instance.

Remove creation of vector to store loop indices
AbandonedPublic

Authored by hiraditya on Jun 28 2017, 11:08 AM.

Details

Summary

Passes make check. No performance/functionality change.

Diff Detail

Event Timeline

hiraditya created this revision.Jun 28 2017, 11:08 AM
efriedma added inline comments.
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
605

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))))

hiraditya abandoned this revision.Jun 30 2017, 6:15 AM
hiraditya added inline comments.
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
605

Ok, then I'll abandon this patch.