[PATCH] D100260: [VPlan] Merge predicated-triangle regions, after sinking.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 28 02:37:05 PDT 2021
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:204
+ auto *MiddleBasicBlock =
+ dyn_cast<VPBasicBlock>(Region1->getSingleSuccessor());
+ if (!MiddleBasicBlock || !MiddleBasicBlock->empty())
----------------
fhahn wrote:
> Ayal wrote:
> > could use `dyn_cast_or_null<VPBasicBlock>(Region1->getSingleSuccessor());` here instead of filtering regions with non single successors earlier (which probably do not exist).
> I kept the code as it is for now, because collecting the candidates up-front is required to avoid iterator invalidation problems caused by removing a region and adjusting predecessors/successors.
Sure, early collection is still needed, can just simply have it collect all regions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100260/new/
https://reviews.llvm.org/D100260
More information about the llvm-commits
mailing list