[PATCH] D96287: [TTI] Change getOperandsScalarizationOverhead to take Type args

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 12:43:29 PST 2021


dmgreen created this revision.
dmgreen added reviewers: PowerPC, jsji, sdesmalen, spatel, RKSimon, fhahn.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely, nemanjai, arsenm.
dmgreen requested review of this revision.
Herald added a project: LLVM.

As a followup to D95291 <https://reviews.llvm.org/D95291>, getOperandsScalarizationOverhead was still using a VF as a vector factor if the arguments were scalar, and would assert on certain matrix intrinsics with differently sized vector arguments. This patch removes the VF arg, instead passing the Types through directly. This should allow it to more accurately compute the cost without having to guess at which operands will be vectorized, something difficult with more complex intrinsics.


https://reviews.llvm.org/D96287

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/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
  llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Analysis/CostModel/PowerPC/matrix.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96287.322191.patch
Type: text/x-patch
Size: 11349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210208/1fa0623d/attachment-0001.bin>


More information about the llvm-commits mailing list