[PATCH] D53349: [VPlan] Changes to implement VPlan based predication for VPlan-native path.

Satish K Guggilla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 16 16:21:42 PDT 2018


sguggill created this revision.
sguggill added reviewers: fhahn, rengolin, hsaito, dcaballe.
Herald added subscribers: llvm-commits, rogfer01, rkruppe, tschuett, bollu, mgorny.

Context: Patch Series #2 for outer loop vectorization support in LV using VPlan. 
(RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119523.html).

Patch series #2 checks that inner loops are still trivially lock-step among all vector elements. Non-loop branches are blindly assumed as divergent.

Changes here implement VPlan based predication algorithm to compute predicates for blocks that need predication. Predicates are computed for the VPLoop region in reverse post order. A block's predicate is computed as OR of the masks of all incoming edges. The mask for an incoming edge is computed as AND of predecessor block's predicate and either predecessor's Condition bit or NOT(Condition bit) depending on whether the edge from predecessor block to the current block is true or false edge.


Repository:
  rL LLVM

https://reviews.llvm.org/D53349

Files:
  lib/Transforms/Vectorize/CMakeLists.txt
  lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  lib/Transforms/Vectorize/VPlan.cpp
  lib/Transforms/Vectorize/VPlan.h
  lib/Transforms/Vectorize/VPlanPredicator.cpp
  lib/Transforms/Vectorize/VPlanPredicator.h
  lib/Transforms/Vectorize/VPlanValue.h
  unittests/Transforms/Vectorize/CMakeLists.txt
  unittests/Transforms/Vectorize/VPlanPredicatorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53349.169918.patch
Type: text/x-patch
Size: 25889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181016/7775bf78/attachment.bin>


More information about the llvm-commits mailing list