[PATCH] D144770: [SLP] Outline GEP chain cost modeling into new TTI interface - NFCI.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 11:20:11 PST 2023
vdmitrie added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:280-287
+ /// All the GEPs in a set have same base address.
+ bool IsSameBaseAddress = false;
+
+ /// These properties only valid if SameBaseAddress is set.
+ /// True if distance between any two neigbouring pointers is same value.
+ bool IsUniformStride = false;
+ /// True if distance between any two neigbouring pointers is a known value.
----------------
ABataev wrote:
> Better to represent them as bitfields:
> ```
> bool IsSameBaseAddress:1 = false;
> bool IsUniformStride:1 = false;
> bool IsKnownStride:1 = false;
> unsigned Reserved: 29;
> ```
That's fair
Will do
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2815-2824
+ InstructionCost VecCost, InstructionCost ScalarCost,
+ StringRef Banner) const {
+ dbgs() << "SLP: " << Banner << ":\n";
+ E->dump();
dbgs() << "SLP: Costs:\n";
dbgs() << "SLP: ReuseShuffleCost = " << ReuseShuffleCost << "\n";
dbgs() << "SLP: VectorCost = " << VecCost << "\n";
----------------
ABataev wrote:
> This change may be committed separately
Split into https://reviews.llvm.org/D144992
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7183
+ // rather than just single use.
+ if (Ptr && !Ptr->hasOneUse())
+ MultipleUseGEPs.push_back(V);
----------------
ABataev wrote:
> Use areAllUsersVectorized?
Yep. That what I was considering. Just though about addressing it in a follow up patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144770/new/
https://reviews.llvm.org/D144770
More information about the llvm-commits
mailing list