[all-commits] [llvm/llvm-project] 725400: [NFCI][SimpleLoopUnswitch] Adjust CostKind query

Sam Parker via All-commits all-commits at lists.llvm.org
Thu Aug 13 23:55:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 725400f9933fe58273d4500d8d6a77a438c43798
      https://github.com/llvm/llvm-project/commit/725400f9933fe58273d4500d8d6a77a438c43798
  Author: Sam Parker <sam.parker at arm.com>
  Date:   2020-08-14 (Fri, 14 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    A llvm/test/Transforms/SimpleLoopUnswitch/ARM/lit.local.cfg
    A llvm/test/Transforms/SimpleLoopUnswitch/ARM/nontrivial-unswitch-cost.ll

  Log Message:
  -----------
  [NFCI][SimpleLoopUnswitch] Adjust CostKind query

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.

Differential Revision: https://reviews.llvm.org/D85829




More information about the All-commits mailing list