[VPlan] Add VPBlockUtils::blocksOnly helper.
authorFlorian Hahn <flo@fhahn.com>
Sun, 25 Apr 2021 16:11:41 +0000 (17:11 +0100)
committerFlorian Hahn <flo@fhahn.com>
Sun, 25 Apr 2021 16:38:09 +0000 (17:38 +0100)
commit4b9be5ac08506bdaea2f8f6cb8e4ead71452f38d
treecf1e4d35fecda108180d07db819af5bd50502644
parent92880ab7a2b2145f0605f367cd6d53d6892903c3
[VPlan] Add VPBlockUtils::blocksOnly helper.

This patch adds a blocksOnly helpers which take an iterator range
over VPBlockBase * or const VPBlockBase * and returns an interator
range that only include BlockTy blocks. The accesses are casted to
BlockTy.

Reviewed By: a.elovikov

Differential Revision: https://reviews.llvm.org/D101093
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/unittests/Transforms/Vectorize/VPlanTest.cpp