[PATCH] D114951: [Analysis][AArch64] Add on the address computational cost for gathers/scatters
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 2 08:10:24 PST 2021
david-arm added a comment.
In X86TTIImpl::getAddressComputationCost there is code like this to analyse strided accesses:
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1791
+ MemOpCost += 1;
return LT.first * MemOpCost * getMaxNumElements(LegalVF);
}
----------------
peterwaller-arm wrote:
> This appears to be increasing the cost by a factor of the legalization cost, in addition to the 1 x element count as stated in the PR body, is that intended? I might instead have expected this to read `return (LT.first * MemOpCost + 1) * getMaxNumElements(LegalVF)`.
Yeah that's intended, because we'll still have the address computational cost for each legal part too. For each legal gather we'll have to construct a set of indices. Maybe I can clarify the commit message - I meant the total element count for the whole vector, even it's not legal.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114951/new/
https://reviews.llvm.org/D114951
More information about the llvm-commits
mailing list