[all-commits] [llvm/llvm-project] b873ab: [LoopVectorizer] NFCI: Calculate register usage ba...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Wed Nov 11 02:21:15 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b873aba3943c067a5efd5303cbdf5aeb0732cf88
      https://github.com/llvm/llvm-project/commit/b873aba3943c067a5efd5303cbdf5aeb0732cf88
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

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

  Log Message:
  -----------
  [LoopVectorizer] NFCI: Calculate register usage based on TLI.getTypeLegalizationCost.

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.

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D91059




More information about the All-commits mailing list