llvm::formDedicatedExitBlocks

Ensure that all exit blocks of the loop are dedicated exits.

Synopsis

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

bool
formDedicatedExitBlocks(
    Loop* L,
    DominatorTree* DT,
    LoopInfo* LI,
    MemorySSAUpdater* MSSAU,
    bool PreserveLCSSA);

Description

For any loop exit block with non-loop predecessors, we split the loop predecessors to use a dedicated loop exit block. We update the dominator tree and loop info if provided, and will preserve LCSSA if requested.

Parameters

NameDescription
LRepresents a single loop in the control flow graph. Note that not all SCCs in the CFG are necessarily loops.
DTConcrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.