This is an archive of the discontinued LLVM Phabricator instance.

[SLP][NFC]Introduce TreeEntry::getVectorFactor member function, NFC.
ClosedPublic

Authored by ABataev on Nov 18 2021, 1:06 PM.

Details

Summary

Added TreeEntry::getVectorFactor to get the final vectotization factor
to simplify the code.

Diff Detail

Event Timeline

ABataev created this revision.Nov 18 2021, 1:06 PM
ABataev requested review of this revision.Nov 18 2021, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 1:06 PM
vporpo added inline comments.Nov 18 2021, 1:41 PM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
1683

"Final" is a bit ambiguous, could you explain a bit more in the comment what this refers to? My understanding is that this refers to the VF used when we generated code, and it may differ from Scalars.size() if this node contains scalars that repeat.

ABataev updated this revision to Diff 388345.Nov 18 2021, 4:03 PM

Address comments.

vporpo accepted this revision.Nov 18 2021, 4:21 PM

LGTM

This revision is now accepted and ready to land.Nov 18 2021, 4:21 PM