This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Make VPInstruction a VPDef
ClosedPublic

Authored by fhahn on Nov 1 2020, 10:48 AM.

Details

Summary

This patch turns updates VPInstruction to manage the value it defines
using VPDef. The VPValue is used during VPlan construction and
codegeneration instead of the plain IR reference where possible.

Diff Detail

Event Timeline

fhahn created this revision.Nov 1 2020, 10:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2020, 10:48 AM
fhahn requested review of this revision.Nov 1 2020, 10:48 AM
bmahjour removed a subscriber: bmahjour.Nov 2 2020, 6:22 AM
fhahn updated this revision to Diff 302348.Nov 2 2020, 11:08 AM

Completely remove toVPValue

fhahn updated this revision to Diff 303241.Nov 5 2020, 1:05 PM

Updated to keep VPWidenMemoryInstructionRecipe a VPValue which is then added to its VPDef. This simplifies things a lot here.

fhahn updated this revision to Diff 303455.Nov 6 2020, 7:33 AM

Update after VPDef does not inherit from VPUser directly.

fhahn updated this revision to Diff 303517.Nov 6 2020, 11:55 AM

Another round of re-basing

gilr added inline comments.Nov 15 2020, 3:05 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
8437

Is this still possible? Shouldn't e.g. WidenMemoryInstruction, InterleaveGroup, WidenCall recipes hold an empty VPDef for stores / functions returning void?

fhahn updated this revision to Diff 305351.Nov 15 2020, 5:02 AM

Remove obsolete isVoidTy check.

fhahn added inline comments.Nov 15 2020, 5:14 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
8437

Good catch, with the VPDef approach, checking for VoidTy is not needed any longer. Removed!

fhahn updated this revision to Diff 306909.Nov 22 2020, 6:12 AM

Remove now obsolete toVPValue.

gilr accepted this revision.Nov 28 2020, 9:47 AM

LGTM, tx!

This revision is now accepted and ready to land.Nov 28 2020, 9:47 AM
fhahn updated this revision to Diff 313260.Dec 22 2020, 1:18 AM

rebase after parent changes landed.

This revision was landed with ongoing or failed builds.Dec 22 2020, 1:54 AM
This revision was automatically updated to reflect the committed changes.