Page MenuHomePhabricator

[VPlan] Make VPInstruction a VPDef
AcceptedPublic

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.Thu, Nov 5, 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.Fri, Nov 6, 7:33 AM

Update after VPDef does not inherit from VPUser directly.

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

Another round of re-basing

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

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.Sun, Nov 15, 5:02 AM

Remove obsolete isVoidTy check.

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

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

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

Remove now obsolete toVPValue.

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

LGTM, tx!

This revision is now accepted and ready to land.Sat, Nov 28, 9:47 AM