This is an archive of the discontinued LLVM Phabricator instance.

[LV] Build generic VPlan up-front.
Changes PlannedPublic

Authored by fhahn on Nov 3 2020, 1:32 PM.

Details

Summary

This is a first step towards generating an initial VPlan up-front using
VPInstructions. No decisions are taken at this point. Starting from this
VPlan, we transform VPInstructions into various recipes if possible,
e.g. by widening them. For now, this still exclusively uses the
underlying instructions and the existing cost model.

Breaking things up further, i.e. lower to specialized recipes without
the legacy cost model, is part of the next steps.

This patch also moves the code to weed out dead instruction into a
transform on the initial VPlan. Similarly, sinking instructions can also
be done up-front, before we widen the VPInstructions. This is also a
follow-up, together with moving more of the existing small patch-ups we
do after generating the VPlans.

Diff Detail

Unit TestsFailed

Event Timeline

fhahn created this revision.Nov 3 2020, 1:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2020, 1:32 PM
fhahn requested review of this revision.Nov 3 2020, 1:32 PM
khchen added a subscriber: khchen.Nov 11 2020, 8:29 AM
fhahn updated this revision to Diff 327188.Mar 1 2021, 10:54 AM

rebased and simplified a bit

fhahn updated this revision to Diff 327214.Mar 1 2021, 11:34 AM

Ping :) Also removed some unrelated changes.

I linked a patch series up to D97712, which starts with a generic initial VPlan (that's created in this patch). For each VF, the plan is cloned and VF specific transformations can now happen on the plans directly. At the moment, that is just VF-specific recipe creation, but it should allow us to finally add some more targeted transforms.

fhahn updated this revision to Diff 335335.Apr 5 2021, 2:56 PM

Rebase and some simplifications.

fhahn updated this revision to Diff 335337.Apr 5 2021, 3:02 PM

Update comment.

Kazhuu added a subscriber: Kazhuu.Apr 6 2021, 12:01 AM
fhahn planned changes to this revision.May 16 2021, 10:48 AM

Putting this on hold for now, to first focus on sinking scalar operands as VPlan-to-VPlan transform: D100258