[PATCH] D152253: [LV] Add option to tune the cost model, NFC
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 03:14:01 PDT 2023
Allen created this revision.
Allen added reviewers: david-arm, dmgreen.
Herald added subscribers: ctetreau, hiraditya.
Herald added a project: All.
Allen requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.
For Neon, the default nonconst stride cost is conservative,
and it is a local variable, which is not convenience to
to tune the loop vectorize.
So I try to use a option, which is similar to SVEGatherOverhead brought in D115143 <https://reviews.llvm.org/D115143>.
https://reviews.llvm.org/D152253
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -42,6 +42,10 @@
static cl::opt<unsigned> SVETailFoldInsnThreshold("sve-tail-folding-insn-threshold",
cl::init(15), cl::Hidden);
+static cl::opt<unsigned>
+ NeonNonConstStrideOverhead("neon-nonconst-stride-overhead", cl::init(10),
+ cl::Hidden);
+
namespace {
class TailFoldingOption {
// These bitfields will only ever be set to something non-zero in operator=,
@@ -2576,7 +2580,7 @@
// likely result in more instructions compared to scalar code where the
// computation can more often be merged into the index mode. The resulting
// extra micro-ops can significantly decrease throughput.
- unsigned NumVectorInstToHideOverhead = 10;
+ unsigned NumVectorInstToHideOverhead = NeonNonConstStrideOverhead;
int MaxMergeDistance = 64;
if (Ty->isVectorTy() && SE &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152253.528766.patch
Type: text/x-patch
Size: 1122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/e6c914d5/attachment.bin>
More information about the llvm-commits
mailing list