This is an archive of the discontinued LLVM Phabricator instance.

[LV] Move LoopBodyTraits to a better place, and add comment for simplifying LoopBlocksTraversal. NFC.
ClosedPublic

Authored by timshen on Aug 15 2016, 3:28 PM.

Details

Summary

I later (after r278573) found that LoopIterator.h has some overlapping with LoopBodyTraits. It's good to use LoopBodyTraits because a *Traits struct is algorithm independent.

Diff Detail

Repository
rL LLVM

Event Timeline

timshen updated this revision to Diff 68096.Aug 15 2016, 3:28 PM
timshen retitled this revision from to [LV] Move LoopBodyTraits to a better place, and add comment for simplifying LoopBlocksTraversal. NFC..
timshen updated this object.
timshen added reviewers: anemet, nadav, mkuper.
timshen added a subscriber: llvm-commits.
anemet edited edge metadata.Aug 15 2016, 8:18 PM

Are you going to have a follow-on to actually use this?

Are you going to have a follow-on to actually use this?

No. I just feel that LoopIterator.h is a better place for it.

mkuper edited edge metadata.Aug 16 2016, 4:53 PM

I'm all for moving this out of LoopVectorizer.cpp and into a relevant header file. This is in fact what I suggested in https://reviews.llvm.org/D22952#506383

I'm all for moving this out of LoopVectorizer.cpp and into a relevant header file. This is in fact what I suggested in https://reviews.llvm.org/D22952#506383

I hope this is not too late. :)

anemet accepted this revision.Aug 17 2016, 2:49 PM
anemet edited edge metadata.

LGTM. It's good to have these in one place and I agree with TODO comment.

This revision is now accepted and ready to land.Aug 17 2016, 2:49 PM
This revision was automatically updated to reflect the committed changes.