This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Add & use VPValue operands for VPWidenCallRecipe (NFC).
ClosedPublic

Authored by fhahn on Apr 7 2020, 8:51 AM.

Details

Summary

This patch adds VPValue versions for the arguments of the call to
VPWidenCallRecipe and uses them during code-generation.

Similar to D76373 this reduces ingredient def-use usage by ILV as
a step towards full VPlan-based def-use relations.

Diff Detail

Event Timeline

fhahn created this revision.Apr 7 2020, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2020, 8:51 AM
gilr added inline comments.Apr 8 2020, 4:33 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
6931

Have VPWidenCallRecipe() take an iterator_range instead of ArrayRef, saving the temporary SmallVector?

fhahn updated this revision to Diff 256071.Apr 8 2020, 10:49 AM

use iterator_range in VPWidenCallRecipe and VPUser constructors

fhahn marked an inline comment as done.Apr 8 2020, 10:50 AM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
6931

The way the types stack up with iterator_range and map_iterator we would need to add template version of the VPWidenCallRecipe and VPUser constructors. I think that would make sense, to provide more convenience to users of those classes. I;ve updated the patch. What do you think?

gilr accepted this revision.Apr 8 2020, 2:24 PM
gilr added inline comments.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
6931

LGTM, thanks!

llvm/lib/Transforms/Vectorize/VPlanValue.h
25

Lexical order

This revision is now accepted and ready to land.Apr 8 2020, 2:24 PM
This revision was automatically updated to reflect the committed changes.