[PATCH] D128302: [AArch64][CostModel] Detects that ExtractElement at index is not free in AArch64 when result is used as integer.

Mingming Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 09:58:24 PDT 2022


mingmingl updated this revision to Diff 440670.
mingmingl retitled this revision from "[LICM][AArch64] Detects that ExtractElement is not free in AArch64 when deciding whether to sink an operation in the exiting block of a loop." to "[AArch64][CostModel] Detects that ExtractElement at index is not free in AArch64 when result is used as integer.".
mingmingl edited the summary of this revision.
mingmingl added a comment.
Herald added subscribers: jsji, kosarev, jsilvanus, pmatos, asb, foad, kerbowa, pengfei, arphaman, kbarton, aheejin, jgravelle-google, sbc100, nhaehnle, jvesely, nemanjai, dschuff, arsenm.

For `getVectorInstrCost` method, optionally pass a pointer of Instruction, and each target can retrieve the (use) context and customize cost estimation. For AArch64 implementation, fall back to use VectorInsertExtractBaseCost rather than regard extract element at index 0 as a free operation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128302/new/

https://reviews.llvm.org/D128302

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/CodeGen/CodeGenPrepare.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
  llvm/lib/Target/AMDGPU/R600TargetTransformInfo.cpp
  llvm/lib/Target/AMDGPU/R600TargetTransformInfo.h
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
  llvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
  llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Analysis/CostModel/AArch64/kryo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128302.440670.patch
Type: text/x-patch
Size: 40472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220628/a942eefe/attachment.bin>


More information about the llvm-commits mailing list