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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 14 04:03:36 PDT 2018


fhahn created this revision.
fhahn added reviewers: dcaballe, hsaito, mssimpso, hfinkel, rengolin, mkuper.
Herald added a reviewer: javed.absar.
Herald added a subscriber: bollu.

This patch adds transformVPInstructionsToVPRecipes, to transform a
VPInstruction VPlan to one with VPRecipes. This allows us to move
towards VPInstruction based VPlans, while still being able to re-use
the VPRecipes for code-generation for now.

This patch updates the inner loop vectorizer to use VPlanHCFGBuilder to
build the initial VPlans and to use transformVPInstructionsToVPRecipes
when executing a VPlan.

This patch just moves things around and makes things clearer, but it modifies
the inner loop vectorizer. I think we should  try to use as many parts of VPlan
for inner loop vectorization as well, to make sure we get as much
testing early on. But I am not entirely sure if it would be better to have
a completely separate inner loop vectorization path in the VPlan native path, to
eliminate the risk of breaking things in the inner loop vectorizers.
What do you think?

The test case changes are due to the fact that scalarization happens later now (at the time of the Vplan execution), thus the position changed.


https://reviews.llvm.org/D46827

Files:
  lib/Transforms/Vectorize/LoopVectorizationPlanner.h
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/AArch64/predication_costs.ll
  test/Transforms/LoopVectorize/SystemZ/load-store-scalarization-cost.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46827.146577.patch
Type: text/x-patch
Size: 12768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180514/27c38012/attachment.bin>


More information about the llvm-commits mailing list