This is an archive of the discontinued LLVM Phabricator instance.

[LV] Collect a list of all element types found in the loop (NFC)
ClosedPublic

Authored by kmclaughlin on Jul 5 2021, 9:49 AM.

Details

Summary

Splits getSmallestAndWidestTypes into two functions, one of which now collects
a list of all element types found in the loop (ElementTypesInLoop). This ensures we do not
have to iterate over all instructions in the loop again in other places, such as in D102253
which disables scalable vectorization of a loop if any of the instructions use invalid types.

Diff Detail

Event Timeline

kmclaughlin created this revision.Jul 5 2021, 9:49 AM
kmclaughlin requested review of this revision.Jul 5 2021, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2021, 9:49 AM
sdesmalen accepted this revision.Jul 5 2021, 1:53 PM

Other than my nit, this looks fine to me.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
1309

nit: collectElementTypesForWidening ?

This revision is now accepted and ready to land.Jul 5 2021, 1:53 PM
This revision was landed with ongoing or failed builds.Jul 6 2021, 2:46 AM
This revision was automatically updated to reflect the committed changes.
kmclaughlin marked an inline comment as done.