[PATCH] D44735: [LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 09:55:02 PDT 2018


hsaito added a comment.

In https://reviews.llvm.org/D44735#1044569, @kparzysz wrote:

> Yes, we do mark those loads as expensive. However, it looks like the condition on line 6158 could potentially eliminate the desired VF if the estimated register pressure is too high.


Between line 6162 and 6263, you can add something like

  auto MinVF = TTI.getMinimumVF(SmallestType);
  if (MinVF > MaxVF)
     MaxVF = MinVF;

Assuming that your load/store HW can be fooled between different data types of the same size (and I think most if not all are),
we really don't need to send in the actual data type. Just need the element data size. That'll minimize the change w/o losing generality.
I think the rest of the job can be (and should be) handled by your Target CG.

I suggest positioning https://reviews.llvm.org/D44735 as a simple refinement of https://reviews.llvm.org/D33341 and then add the above mentioned MinVF adjustment on top, as a separate patch.
Does that work?


Repository:
  rL LLVM

https://reviews.llvm.org/D44735





More information about the llvm-commits mailing list