[PATCH] D78918: [CostModel] Modify BasicTTI getCastInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 05:52:12 PDT 2020


samparker created this revision.
samparker added reviewers: spatel, RKSimon, craig.topper, dmgreen.
Herald added a project: LLVM.

Copy some of the DataLayout checking, for int/ptr conversions, into BasicTTI and fix the assumption that all bitcasts of the same type sizes are free. We now only assume that bitcasts between ints and ptrs of the same size are free. This allows TTImpl->getUserCost to just call the concrete implementation of getCastInstrCost.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78918

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/test/Analysis/CostModel/ARM/cast.ll
  llvm/test/Analysis/CostModel/X86/masked-intrinsic-cost.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78918.260287.patch
Type: text/x-patch
Size: 14669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/6a4dcd3d/attachment.bin>


More information about the llvm-commits mailing list