[all-commits] [llvm/llvm-project] 9448cd: [SVE][Analysis] Tune the cost model according to t...

david-arm via All-commits all-commits at lists.llvm.org
Thu Oct 21 01:34:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9448cdc90007611659ecbec4dca18a83f06bc4c3
      https://github.com/llvm/llvm-project/commit/9448cdc90007611659ecbec4dca18a83f06bc4c3
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64Subtarget.cpp
    M llvm/lib/Target/AArch64/AArch64Subtarget.h
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/test/Analysis/CostModel/AArch64/sve-gather.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-strict-fadd-cost.ll

  Log Message:
  -----------
  [SVE][Analysis] Tune the cost model according to the tune-cpu attribute

This patch introduces a new function:

  AArch64Subtarget::getVScaleForTuning

that returns a value for vscale that can be used for tuning the cost
model when using scalable vectors. The VScaleForTuning option in
AArch64Subtarget is initialised according to the following rules:

1. If the user has specified the CPU to tune for we use that, else
2. If the target CPU was specified we use that, else
3. The tuning is set to "generic".

For CPUs of type "generic" I have assumed that vscale=2.

New tests added here:

  Analysis/CostModel/AArch64/sve-gather.ll
  Analysis/CostModel/AArch64/sve-scatter.ll
  Transforms/LoopVectorize/AArch64/sve-strict-fadd-cost.ll

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




More information about the All-commits mailing list