[PATCH] D67948: [LV] Interleaving should not exceed estimated loop trip count.

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 22:29:53 PDT 2019


ebrevnov marked an inline comment as done.
ebrevnov added a comment.

In D67948#1711380 <https://reviews.llvm.org/D67948#1711380>, @hsaito wrote:

> In D67948#1710615 <https://reviews.llvm.org/D67948#1710615>, @ebrevnov wrote:
>
> > @hsaito, Please commit if you find this version acceptable.
>
>
> @ebrevnov, I recommend you visit http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access and obtain your own commit access. Your committed and under review patches deserve it.
>  Thank you very much for your contribution. Let me know if you still would like me to commit this one.


I was going to do that right after this patch lands. Please assist me (hopefully last time) in landing the patch.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5265-5266
 
   // If the trip count is constant, limit the interleave count to be less than
   // the trip count divided by VF.
+  if (BestKnownTC) {
----------------
hsaito wrote:
> ebrevnov wrote:
> > hsaito wrote:
> > > If trip count is expected to be small, limit the interleave count to be less than the trip count divided by VF
> > There is some ambiguity in using "small" through out the code. For getSmallBestKnownTC  "small" is if it fits 32-bit. For "if (BestKnownTC && *BestKnownTC < TinyTripCountInterleaveThreshold)" check "small" is what less than TinyTripCountInterleaveThreshold. Here "small" should refer to the meaning defined by getSmallBestKnownTC .
> > I think we better avoid using "small" one more time here to minimize the confusion.
> Sorry for being unclear. I was suggesting an update to the comment. With this patch, BestKnownTC is not constant, right?
I see what you are talking about. Another ambiguity here :-) BestKnownTC returns compile time constant value which may be exact runtime constant or estimated non-constant. In this case I believe "constant" means that we were able to get a compile time constant value for the trip count. How about the following wording?

// If trip count is known or estimated compile time constant, limit ....


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67948/new/

https://reviews.llvm.org/D67948





More information about the llvm-commits mailing list