[PATCH] D85723: [LoopUnroll] Adjust CostKind query

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 05:28:11 PDT 2020


samparker created this revision.
samparker added reviewers: fhahn, dmgreen, dfukalov, mtrofin, ashlykov.
Herald added subscribers: zzheng, hiraditya.
Herald added a project: LLVM.
samparker requested review of this revision.

When TTI was updated to use an explicit cost, TCK_CodeSize was used although the default implicit cost would have been the hand-wavey cost of size and latency. So, revert back to this behaviour. This is not expected to have (much) impact on targets since most (all?) of them return the same value for SizeAndLatency and CodeSize.

      

When optimising for size, the logic has been changed to query CodeSize costs instead of SizeAndLatency.

      

This patch also adds a testing option in the unroller so that OptSize thresholds can be specified.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85723

Files:
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  llvm/test/Transforms/LoopUnroll/ARM/instr-costs.ll
  llvm/test/Transforms/LoopUnroll/ARM/unroll-optsize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85723.284672.patch
Type: text/x-patch
Size: 20903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/16fb2f60/attachment.bin>


More information about the llvm-commits mailing list