[PATCH] D85829: [NFCI][SimpleLoopUnswitch] Adjust CostKind query

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 04:53:50 PDT 2020


samparker created this revision.
samparker added reviewers: mkazantsev, dfukalov, asbirlea.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.
samparker requested review of this revision.

When getUserCost was transitioned to use an explicit CostKind, TCK_CodeSize was used even though the original kind was implicitly SizeAndLatency so restore this behaviour. We now only query for CodeSize when optimising for minsize.
I expect this to not change anything as, I think all, targets will currently return the same value for CodeSize and SizeLatency. Indeed I see no changes in the test suite for Arm, AArch64 and X86.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85829

Files:
  llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  llvm/test/Transforms/SimpleLoopUnswitch/ARM/lit.local.cfg
  llvm/test/Transforms/SimpleLoopUnswitch/ARM/nontrivial-unswitch-cost.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85829.285042.patch
Type: text/x-patch
Size: 22870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/d8104eea/attachment.bin>


More information about the llvm-commits mailing list