This is an archive of the discontinued LLVM Phabricator instance.

[LoopVectorize] NFC: Change selectVectorizationFactor to work on ElementCount.
ClosedPublic

Authored by sdesmalen on Feb 4 2021, 4:58 AM.

Details

Summary

This patch is NFC and changes occurrences of unsigned Width
and unsigned i to work on type ElementCount instead.

This patch is a preparatory patch with the ultimate goal of making
computeMaxVF() return both a max fixed VF and a max scalable VF,
so that selectVectorizationFactor() can pick the most cost-effective
vectorization factor.

Diff Detail

Event Timeline

sdesmalen created this revision.Feb 4 2021, 4:58 AM
sdesmalen requested review of this revision.Feb 4 2021, 4:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 4:58 AM
david-arm added inline comments.Feb 8 2021, 3:34 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
5873

Perhaps this should be getFixedValue() since it can never be scalable?

sdesmalen updated this revision to Diff 322481.Feb 9 2021, 1:10 PM
sdesmalen marked an inline comment as done.

s/getKnownMinValue/getFixedValue/

This revision is now accepted and ready to land.Feb 10 2021, 1:25 AM