[PATCH] D123005: [VPlan] Use region for each loop in native path, remove VPLoopInfo.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 3 13:35:00 PDT 2022


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin, sguggill.
Herald added subscribers: tschuett, psnobl, rogfer01, bollu, kuhar, hiraditya, mgorny.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

This patch updates the VPlan native path to use VPRegionBlocks for all
loops in a loop nest. Up to now, only the outermost loop used a region.

This is a step towards unifying both paths and keep things consistent
between them. It also prepares various code-gen parts for modeling the
pre-header in the inner loop vectorizer (D121624 <https://reviews.llvm.org/D121624>).

Now that loops are modeled explicitly via regions in a VPlan, there
should be no need for VPLoopInfo, so it has been removed. VPLoopInfo is
also incompatible with the region representation, because it relies on
explicit back-edges to identify loops.

Unfortunately this also breaks the VPlanPredicator, as it does not support
nested regions. The VPlanPredicator code paths currently are only tested
via unit tests. I don't think we should block progress on this code and
remove or disable it for now. The same goes for VPDominatorTree, which
doesn't properly supports nested regions either.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123005

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
  llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.h
  llvm/lib/Transforms/Vectorize/VPlanLoopInfo.h
  llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
  llvm/lib/Transforms/Vectorize/VPlanPredicator.h
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
  llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
  llvm/unittests/Transforms/Vectorize/CMakeLists.txt
  llvm/unittests/Transforms/Vectorize/VPlanDominatorTreeTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanLoopInfoTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanPredicatorTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
  llvm/unittests/Transforms/Vectorize/VPlanTestBase.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123005.420085.patch
Type: text/x-patch
Size: 41789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220403/fd02bec9/attachment.bin>


More information about the llvm-commits mailing list