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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 11:32:38 PST 2020


jonpa added a comment.

> It did not work for the reduced test I have submitted with the change for a simple reason: it was not checked.

Yeah - but if you have it and post it here we can work together on it...  Maybe an .ll/.bc file with a runline which gives in the output what you need to avoid. Maybe even an llc runline on that to show the spilling...

> I can understand the argument that controlling it with register size might not be a best approach. In this case we can just expose another target callback, specifically for the vectorization purposes.

Would it make sense to have SLP first try the full group, and then as long as it's not profitable reiterate with half of the previous group size? In other words first try 32 in your case, and then start over with a max of 16, then 8, all the way down to 2 unless TTI costs returned a profitable total cost? That is one idea.. An alternative might be to have SLP look at the tree it wants to convert and do a register pressure estimate and add that to the total cost...  This is assuming that greater VFs are beneficial, which I at least think they are at the moment...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82227



More information about the llvm-commits mailing list