[PATCH] D149167: [TTI] Add getPHICost to better cost phi operands. NFCI

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:18:54 PDT 2023


luke created this revision.
luke added reviewers: ABataev, RKSimon, reames.
Herald added subscribers: asb, kosarev, pmatos, foad, kerbowa, pengfei, kbarton, hiraditya, jvesely, nemanjai, arsenm.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

In order to better account for the cost of constant materialization in
phis, specifically in the SLP vectorizer, we would like to start
providing targets information about their operands via OperandValueInfo.

This patch separates out phi instructions from getCFInstrCost so we can
pass the type as well as information about the incoming values, i.e. if
they are constant or not.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149167

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/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Target/AMDGPU/R600TargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149167.516838.patch
Type: text/x-patch
Size: 16885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/fb22b6e7/attachment.bin>


More information about the llvm-commits mailing list