[PATCH] D110259: [SVE][Analysis] Tune the cost model according to the tune-cpu attribute
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 08:06:17 PDT 2021
david-arm created this revision.
david-arm added reviewers: sdesmalen, CarolineConcatto, kmclaughlin, dmgreen.
Herald added subscribers: ctetreau, psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch introduces a new function:
AArch64Subtarget::getVScaleForTuning
that attempts to return a value for vscale that can be used for tuning
the cost model when using scalable vectors. The function attempts to
determine vscale in the following order:
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. If the vscale_range attribute is present for the function we use the maximum value, else
4. If none of the above assume vscale=16.
For CPUs of type "generic" I have assumed that vscale=4.
Tests added here:
Analysis/CostModel/AArch64/sve-gather.ll
Analysis/CostModel/AArch64/sve-scatter.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110259
Files:
llvm/lib/Target/AArch64/AArch64Subtarget.cpp
llvm/lib/Target/AArch64/AArch64Subtarget.h
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/test/Analysis/CostModel/AArch64/sve-gather.ll
llvm/test/Analysis/CostModel/AArch64/sve-scatter.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110259.374241.patch
Type: text/x-patch
Size: 33965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/b4e7186b/attachment.bin>
More information about the llvm-commits
mailing list