This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Keep start value in VPWidenIntOrFpInductionRecipe (NFC).
ClosedPublic

Authored by fhahn on Nov 25 2020, 1:12 PM.

Details

Summary

This patch updates VPWidenIntOrFpInductionRecipe to hold the start value
for the induction variable. This makes the start value explicit and
allows for adjusting the start value for a VPlan.

The flexibility will be used in further patches.

Diff Detail

Event Timeline

fhahn created this revision.Nov 25 2020, 1:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2020, 1:12 PM
fhahn requested review of this revision.Nov 25 2020, 1:12 PM
fhahn updated this revision to Diff 313679.Dec 24 2020, 2:55 AM

Ping :)

rebased and updated to manage start value as VPValue operand

fhahn updated this revision to Diff 313803.Dec 27 2020, 1:29 PM

updated to use a VPValues to manage the start value. Ping :)

Ayal added a comment.Jan 5 2021, 4:43 AM

Good step towards representing more Values, and in particular recording InductionDescriptor information, in VPlan!

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
8718–8719

getStateValue() can be asserted to be a live-in, i.e., have a null Def, and then we can obtain its underlying Value (the latter possibly asserted to be non null)?

fhahn updated this revision to Diff 314585.Jan 5 2021, 6:12 AM

Update after renaming to getLiveInIRValue.

fhahn added inline comments.Jan 5 2021, 6:13 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
8718–8719

I updated D92281 to include such an assertion in getLiveInIRValue. There will be multiple users, so I think it would make sense to keep the simple helper, but I can also remove it if you think that's preferable.

Ayal accepted this revision.Jan 5 2021, 2:20 PM

This looks good to me, thanks!

This revision is now accepted and ready to land.Jan 5 2021, 2:20 PM
fhahn updated this revision to Diff 314843.Jan 6 2021, 3:29 AM

rebased

This revision was landed with ongoing or failed builds.Jan 6 2021, 3:47 AM
This revision was automatically updated to reflect the committed changes.