19 #define DEBUG_TYPE "loop-vectorize" 32 for (
const auto *Block : VPBlockVec) {
33 if (VPBlockSet.
count(Block))
49 assert(VPB->getParent() == Region &&
"VPBlockBase has wrong parent");
52 if (VPB->getNumSuccessors() > 1)
53 assert(VPB->getCondBit() &&
"Missing condition bit!");
55 assert(!VPB->getCondBit() &&
"Unexpected condition bit!");
58 const auto &Successors = VPB->getSuccessors();
62 "Multiple instances of the same successor.");
66 const auto &SuccPreds = Succ->getPredecessors();
69 "Missing predecessor link.");
74 const auto &Predecessors = VPB->getPredecessors();
79 "Multiple instances of the same predecessor.");
83 assert(Pred->getParent() == VPB->getParent() &&
84 "Predecessor is not in the same region.");
87 const auto &PredSuccs = Pred->getSuccessors();
90 "Missing successor link.");
120 if (
const auto *SubRegion = dyn_cast<VPRegionBlock>(VPB))
131 assert(!TopRegion->
getParent() &&
"VPlan Top Region should have no parent.");
This class represents lattice values for constants.
VPRegionBlock * getParent()
VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-S...
static void verifyRegion(const VPRegionBlock *Region)
Verify the CFG invariants of VPRegionBlock Region and its nested VPBlockBases.
static bool hasDuplicates(const SmallVectorImpl< VPBlockBase *> &VPBlockVec)
Utility function that checks whether VPBlockVec has duplicate VPBlockBases.
static cl::opt< bool > EnableHCFGVerifier("vplan-verify-hcfg", cl::init(false), cl::Hidden, cl::desc("Verify VPlan H-CFG."))
const VPBlockBase * getExit() const
void verifyHierarchicalCFG(const VPRegionBlock *TopRegion) const
Verify the invariants of the H-CFG starting from TopRegion.
initializer< Ty > init(const Ty &Val)
std::pair< iterator, bool > insert(const ValueT &V)
size_t getNumPredecessors() const
size_t getNumSuccessors() const
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
static void verifyRegionRec(const VPRegionBlock *Region)
Verify the CFG invariants of VPRegionBlock Region and its nested VPBlockBases.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Implements a dense probed hash-table based set with some number of buckets stored inline...
const VPBlockBase * getEntry() const
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
This file declares the class VPlanVerifier, which contains utility functions to check the consistency...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static void verifyBlocksInRegion(const VPRegionBlock *Region)
Helper function that verifies the CFG invariants of the VPBlockBases within Region.