<div dir="ltr">Hi Francesco,<div><br></div><div>As I said in the review, the approach looks good to me. </div><div><br></div><div>I agree this will make it easier for VPlan to create multiple plans like that, so that's a positive change. And I can't see a negative side for the existing vectoriser, other than a bit more clutter with {VF, false} instead of just VF. But that's not important.</div><div><br></div><div>cheers,</div><div>--renato</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 11 Aug 2020 at 23:58, Francesco Petrogalli via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I am working on replacing `unsigned VF` with `ElementCount VF` in the vectorizer. <br>
<br>
I have submitted an RFC patch to fabricator just to show how it looks like: <a href="https://reviews.llvm.org/D85794" rel="noreferrer" target="_blank">https://reviews.llvm.org/D85794</a><br>
<br>
Just to be clear. I am not trying to get this patch in as it is, I am just asking for some feedback on the approach.<br>
<br>
The changes in the vectorizer are numerous, but mostly mechanical.<br>
<br>
I have explained in the description of the patch the changes, which fall in two categories:<br>
<br>
1. changes outsize the vectorizer, which are needed to be able to query things like "how many lanes" are in this "vectorization factor", or to print things to debug streams or remarks.<br>
2. changes in the vectorizer that are needed to guarantee a _non functional change_, for example asserting that the ElementCount instance being used to compute a vector reverse cannot be scalable. The code essentially looks the same as before this patch, other than for the fact that I have added such assertions.<br>
<br>
I am aware the changes in LoopVectorizer.cpp might be a lot. I am open to consider different incremental approaches. <br>
One data point here is that my initial approach was to add the `bool Scalable` property to the VectorizationFactor class.<br>
However, using ElementCount instead of the pair {unsigned, bool} for dealing with the number of lanes inside the VectorizationFactor seemed a natural choice that was worth investigating.<br>
<br>
Please let me know what you think!<br>
<br>
Kind regards,<br>
<br>
Francesco<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>