[PATCH] D79164: [CostModel] getCFInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 03:01:50 PDT 2020


samparker created this revision.
samparker added reviewers: dmgreen, RKSimon, craig.topper, spatel, arsenm.
Herald added subscribers: kerbowa, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, tpr, nhaehnle, wdng, jvesely, nemanjai.
Herald added a project: LLVM.
samparker added a parent revision: D79002: [NFC][CostModel] Add TargetCostKind to relevant APIs.
Herald added a subscriber: wuzish.

Have BasicTTI call the base implementation so that both agree on the default behaviour, which the default being a cost of '1'. This has required an X86 specific implementation as it seems to be very reliant on those instructions being free. Changes are also made to AMDGPU so that their implementations distinguish between cost kinds, so that the unrolling isn't affected. The cost model changes now reflect that ret instructions are not generally free.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79164

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.h
  llvm/test/Analysis/CostModel/AArch64/aggregates.ll
  llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll
  llvm/test/Analysis/CostModel/ARM/arith.ll
  llvm/test/Analysis/CostModel/ARM/cast.ll
  llvm/test/Analysis/CostModel/ARM/divrem.ll
  llvm/test/Analysis/CostModel/ARM/fparith.ll
  llvm/test/Analysis/CostModel/ARM/freeshift.ll
  llvm/test/Analysis/CostModel/ARM/gep.ll
  llvm/test/Analysis/CostModel/ARM/icmps.ll
  llvm/test/Analysis/CostModel/ARM/insertelement.ll
  llvm/test/Analysis/CostModel/ARM/load_store.ll
  llvm/test/Analysis/CostModel/ARM/memcpy.ll
  llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll
  llvm/test/Analysis/CostModel/ARM/select.ll
  llvm/test/Analysis/CostModel/ARM/shuffle.ll
  llvm/test/Analysis/CostModel/PowerPC/insert_extract.ll
  llvm/test/Analysis/CostModel/RISCV/gep.ll
  llvm/test/Analysis/CostModel/SystemZ/cmp-mem.ll
  llvm/test/Analysis/CostModel/SystemZ/int-operands-extcost.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79164.261168.patch
Type: text/x-patch
Size: 276165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200430/a4bd83ce/attachment-0001.bin>


More information about the llvm-commits mailing list