llvm::collectChildrenInLoop

Does a BFS from a given node to all of its children inside a given loop. The returned vector of basic blocks includes the starting point.

Synopsis

Declared in <llvm/Transforms/Utils/LoopUtils.h>

SmallVector<BasicBlock*, 16>
collectChildrenInLoop(
    DominatorTree* DT,
    DomTreeNode* N,
    Loop const* CurLoop);

Return Value

Basic blocks reachable from N inside CurLoop, including the start.

Parameters

NameDescription
DTDominator tree used to walk children.
NDominator-tree node to start the BFS from.
CurLoopLoop that bounds which children are collected.