[PATCH] D82227: SLP: honor requested max vector size merging PHIs

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 21 04:13:46 PDT 2020


ABataev added a comment.

In D82227#2105554 <https://reviews.llvm.org/D82227#2105554>, @rampitec wrote:

> In D82227#2105469 <https://reviews.llvm.org/D82227#2105469>, @ABataev wrote:
>
> > Why it is required?
>
>
> The whole pass only creates vectors up to the size of a vector register provided by a target, this is simply an omission in this place not to check it.
>
> On practice the testcase is reduced from a real app where it has created two <32 x float> vectors and RA run out of registers. Both have to be alive at the same loop and we did not have sufficient number of registers.


Actually, that was the goal in some cases, to create the vectors of the maximum possible length so, later they could be split into several smaller vectors. I addume, this chanhe may increase compile time on the regular targets, where we can create large vectors without problems.
I think, you need to fix the cost of the vectorization of the large vectors for your target, so the SLP could consider it unprofitable to vectorize large vectors.


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

https://reviews.llvm.org/D82227





More information about the llvm-commits mailing list