[PATCH] D26905: [SLP] Vectorize loads of consecutive memory accesses, accessed in non-consecutive (jumbled) way.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 05:34:12 PST 2016
RKSimon added inline comments.
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1029
+ unsigned PtrBitWidth = DL.getPointerSizeInBits(AS);
+ Type *Ty = cast<PointerType>(Ptr->getType())->getElementType();
+ APInt Size(PtrBitWidth, DL.getTypeStoreSize(Ty));
----------------
ashahid wrote:
> RKSimon wrote:
> > You are casting to PointerType and then only using it as a Type.
> This is to resolve method membership error "class llvm::Type’ has no member named ‘getElementType" during compile time .
Sorry my mistake!
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1257
Type *SrcTy = VL0->getOperand(0)->getType();
for (unsigned i = 0; i < VL.size(); ++i) {
Type *Ty = cast<Instruction>(VL[i])->getOperand(0)->getType();
----------------
ashahid wrote:
> RKSimon wrote:
> > for (unsigned i = 0, e = VL.size(); i < e; ++i) {
> Do you want me to change the style of FOR statement to the above one?
Yes please - since you're touching this code, it might as well be dealt with. It can be done as a NFC pre-commit if you prefer to keep this patch cleaner.
https://reviews.llvm.org/D26905
More information about the llvm-commits
mailing list