[VPlan] Adjust mergeReplicateRegions to be in line with mergeBlock (NFC)
authorFlorian Hahn <flo@fhahn.com>
Sun, 1 Jan 2023 19:48:48 +0000 (19:48 +0000)
committerFlorian Hahn <flo@fhahn.com>
Sun, 1 Jan 2023 19:48:49 +0000 (19:48 +0000)
commit89718815c6694445fa401929702f3bc28f597141
treea130e3704fad8c711646339c94e7a9f34df64d95
parentd408c34d1f588e518b0ee15c00b55db131944cfb
[VPlan] Adjust mergeReplicateRegions to be in line with mergeBlock (NFC)

Adjust mergeReplicateRegions to be in line with
mergeBlocksIntoPredecessors added in 36d70a6aea6b by collecting only the
valid candidates first.

Also rename to mergeReplicateRegionsIntoSuccessors and add missing
doc-comment.

This addresses post-commit suggestions by @Ayal.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
llvm/lib/Transforms/Vectorize/VPlanTransforms.h