[PATCH] D131015: [LV] Track all IR blocks corresponding to VPBasicBlock

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 13:26:00 PDT 2022


reames created this revision.
reames added reviewers: david-arm, fhahn.
Herald added subscribers: rogfer01, bollu, hiraditya, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

When working with edges entering or leaving a VPBasicBlock, we need to use either the first or last IR block corresponding to the VPBasicBlock.  The existing code is only correct when a VPBasicBlock in the header or latch position corresponds to exactly one BasicBlock.  This happens to be true as the only VPBasicBlock which corresponds to more than one BasicBlock today is a VPReplicateRecipe which (as an implementation detail) can't be either a loop header or latch.

I decided to track the whole set for simplicity.  It feels odd to not have a way to map IR blocks to VP blocks and vice versa, so since I was changing it anyways, figured I'd just track the whole set.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131015

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131015.449401.patch
Type: text/x-patch
Size: 6815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220802/0b1a69da/attachment.bin>


More information about the llvm-commits mailing list