Page MenuHomePhabricator

[LoopVectorize] NFC: Split off clamping from computeFeasibleUserVF into its own function.

Authored by sdesmalen on Feb 4 2021, 5:16 AM.



This patch is NFC and cleans up computeFeasibleUserVF() by moving the clamping
into a separate function, that can be reused in multiple places, including
computeFeasibleMaxVF. This helps prepare the code to operate on scalable

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, 5:16 AM
sdesmalen requested review of this revision.Feb 4 2021, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 5:16 AM
sdesmalen set the repository for this revision to rG LLVM Github Monorepo.
sdesmalen updated this revision to Diff 327896.Mar 3 2021, 1:46 PM
  • Simplified clampFeasibleMaxVF (it no longer returns a tuple).
  • Reuse calculation for MaxSafeVF by passing it to computeFeasibleMaxVF.
sdesmalen abandoned this revision.Mar 12 2021, 7:34 AM

Abandoned in favour of D98509