This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Use VPValue def for VPWidenSelectRecipe.
ClosedPublic

Authored by fhahn on Jul 27 2020, 10:38 AM.

Details

Summary

This patch turns VPWidenSelectRecipe into a VPValue and uses it
during VPlan construction and codegeneration instead of the plain IR
reference where possible.

Diff Detail

Event Timeline

fhahn created this revision.Jul 27 2020, 10:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2020, 10:38 AM
dmgreen added inline comments.
llvm/lib/Transforms/Vectorize/VPlan.cpp
852

I like this, by the way.

llvm/lib/Transforms/Vectorize/VPlan.h
891

VPRecipeBase::VPWidenSelectSC

907

Add a const version too?

fhahn updated this revision to Diff 296232.Oct 5 2020, 10:56 AM
fhahn marked 2 inline comments as done.

Addressed @dmgreen's comment, thanks! Also updated code to just use shared VPRecipeBase::getUnderlyingInstr()

fhahn added inline comments.Oct 5 2020, 11:29 AM
llvm/lib/Transforms/Vectorize/VPlan.h
907

I moved getUnderlyingInstr() up to VPRecipeBase , which is using toVPValue and updated the code here to use it, as you suggested at a different review IIRC.

dmgreen accepted this revision.Oct 6 2020, 1:31 AM

LGTM

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
7643–7647

I think we should just be removing NeedDef!

This revision is now accepted and ready to land.Oct 6 2020, 1:31 AM
fhahn updated this revision to Diff 304241.Nov 10 2020, 9:52 AM

Rebase ahead of landing.

fhahn updated this revision to Diff 304260.Nov 10 2020, 10:57 AM

rebase on master...

This revision was landed with ongoing or failed builds.Nov 10 2020, 11:40 AM
This revision was automatically updated to reflect the committed changes.