[llvm] [VPlan] Generalize collectUsersInExitBlocks for multiple exit bbs. (PR #115066)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 06:50:47 PST 2024
================
@@ -306,6 +306,15 @@ template <> struct GraphTraits<VPlan *> {
}
};
+inline auto VPlan::getExitBlocks() {
+ VPBlockBase *ScalarHeader = getScalarHeader();
+ return make_filter_range(
+ VPBlockUtils::blocksOnly<VPIRBasicBlock>(
+ vp_depth_first_shallow(getVectorLoopRegion()->getSingleSuccessor())),
+ [ScalarHeader](VPIRBasicBlock *VPIRBB) {
+ return VPIRBB != ScalarHeader && VPIRBB->getNumSuccessors() == 0;
----------------
david-arm wrote:
Yeah, thanks for explaining! I realised that around the same time that you replied. It just took me a while to figure it out. :)
https://github.com/llvm/llvm-project/pull/115066
More information about the llvm-commits
mailing list