[llvm] [VPlan] Simplify the computation of the block entry mask. (PR #173265)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 3 00:56:20 PST 2026
================
@@ -113,6 +113,74 @@ class VPAllSuccessorsIterator
}
};
+/// Similar to VPAllSuccessorsIterator but for predecessors. For VPRegionBlocks,
+/// visits their exiting block instead of direct predecessors.
+template <typename BlockPtrTy>
+class VPAllPredecessorsIterator
+ : public iterator_facade_base<VPAllPredecessorsIterator<BlockPtrTy>,
+ std::forward_iterator_tag, VPBlockBase> {
+ BlockPtrTy Block;
+ /// Analogous to SuccessorIdx in VPAllSuccessorsIterator but for the index of
+ /// predecessor.
+ size_t PredecessorIdx;
----------------
Mel-Chen wrote:
Thank you! Rebased on your branch :)
https://github.com/llvm/llvm-project/pull/173265
More information about the llvm-commits
mailing list