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.

Return Value

True if any exit blocks were made dedicated.

Parameters

NameDescription
LThe loop whose exits should be made dedicated.
DTDominator tree to update, or nullptr.
LILoop info to update, or nullptr.
MSSAUMemorySSA updater, or nullptr.
PreserveLCSSAWhether to preserve LCSSA form when splitting.