[VPlan] Turn VPReductionRecipe into a VPValue
authorDavid Green <david.green@arm.com>
Tue, 24 Nov 2020 10:08:59 +0000 (10:08 +0000)
committerDavid Green <david.green@arm.com>
Wed, 25 Nov 2020 08:25:05 +0000 (08:25 +0000)
commit00a66011366c7b037d6680e6015524a41b761c34
tree1ed08aade0329167e4fa25c7019aa66e044afc0b
parentec0b927e4aa863dd610b97f3d6e996ca05475846
[VPlan] Turn VPReductionRecipe into a VPValue

This converts the VPReductionRecipe into a VPValue, like other
VPRecipe's in preparation for traversing def-use chains. It also makes
it a VPUser, now storing the used VPValues as operands.

It doesn't yet change how the VPReductionRecipes are created. It will
need to call replaceAllUsesWith from the original recipe they replace,
but that is not done yet as VPWidenRecipe need to be created first.

Differential Revision: https://reviews.llvm.org/D88382
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanValue.h
llvm/test/Transforms/LoopVectorize/vplan-printing.ll