This is an archive of the discontinued LLVM Phabricator instance.

[LV] Iterate over recipes in VPlan to fix PHI (NFC).
ClosedPublic

Authored by fhahn on Mar 24 2021, 12:51 PM.

Details

Summary

As we gradually move more elements of LV to VPlan, we are trying to
reduce the number of places that still has to check IR of the original
loop.

This patch adjusts the code to fix cross iteration phis to get the PHIs
to fix directly from the VPlan that is executed. We still need the
original PHI to check for first-order recurrences, but we can get rid of
that once we model that explicitly in VPlan as well.

Diff Detail

Event Timeline

fhahn created this revision.Mar 24 2021, 12:51 PM
fhahn requested review of this revision.Mar 24 2021, 12:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 12:51 PM
Herald added a subscriber: vkmr. · View Herald Transcript
fhahn updated this revision to Diff 335472.Apr 6 2021, 4:12 AM

rebase & ping

fhahn updated this revision to Diff 341165.Apr 28 2021, 5:46 AM

Updated to use phis() from D100101.

Ayal accepted this revision.Apr 28 2021, 11:52 PM

Looks good to me, adding a minor nit; worth adding "NFC" to title.

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

iterate over Header->phis()?

This revision is now accepted and ready to land.Apr 28 2021, 11:52 PM
fhahn retitled this revision from [LV] Iterate over recipes in VPlan to fix PHIs. to [LV] Iterate over recipes in VPlan to fix PHI (NFC)..Apr 29 2021, 4:56 AM
fhahn updated this revision to Diff 341474.Apr 29 2021, 4:56 AM

Rebased. This depends on the patch adding phis() (D100101)

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

This should be updated now I think.

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