[PATCH] D91059: [LoopVectorizer] NFCI: Calculate register usage based on TLI.getTypeLegalizationCost.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 02:26:00 PST 2020


sdesmalen created this revision.
sdesmalen added reviewers: fhahn, SjoerdMeijer, Ayal, vkmr, ctetreau, dmgreen.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
sdesmalen requested review of this revision.

This is more accurate than dividing the bitwidth based on the element count by the
maximum register size, as it can just reuse whatever has been calculated for
legalization of these types.

This change is also necessary when calculating register usage for scalable vectors, where
the legalization of these types cannot be done based on the widest register size, because
that does not take the 'vscale' component into account.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91059

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91059.303783.patch
Type: text/x-patch
Size: 4206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201109/cd0c25f4/attachment.bin>


More information about the llvm-commits mailing list