[PATCH] D46827: [LV] Add VPInstruction to VPRecipe transformation.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 25 09:41:17 PDT 2018


fhahn added a comment.

I've tried restructuring the patch as suggested now and would appreciate your feedback on a few things before I update the patch:

- Location of transformVPInstructionsToVPRecipies: I agree with Diego that LoopVectorizationPlanner is not the ideal place. But it needs access to the `tryTo*` functions to create VPRecipes, which unfortunately are defined in LoopVectorizationPlanner.  I think there are 3 options: 1) keep transformVPInstructionsToVPRecipies in LoopVectorizationPlanner, 2) move the `tryTo*` functions to a better place (something like VPRecipeBuilder) or 3) pass a LoopVectorizationPlanner to the VPInstructionToVPRecipe transform. I think we should go for 1), if there is a concrete plan to get rid of VPRecipes in the near future or 2) if we need to keep the VPRecipes around for the time being (at least for the non-VPlan native path)

- Move VPInstructionToVPRecipe to the VPlan native path: should be fairly straight forward, we already instantiate the legacy cost model in the VPlan native path, all we need to do is to allow inner loops in the VPlan native path, use the cost model to get the MaxVF and hook up VPlan execution, in case we decide to vectorize. We can migrate all those parts to VPlan infrastructure separately. Does that make sense?

- Simplify buildVPlans() in the non VPlan native path: if we are pushing development of the VPlan based inner loop vectorization to the VPlan native path, we can avoid creating VPlans for each valid vectorization factor, as we throw them away without using them.


https://reviews.llvm.org/D46827





More information about the llvm-commits mailing list