llvm::breakLoopBackedge

Remove the backedge of a top-level single-latch loop.

Synopsis

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

void
breakLoopBackedge(
    Loop* L,
    DominatorTree& DT,
    ScalarEvolution& SE,
    LoopInfo& LI,
    MemorySSA* MSSA);

Description

Handles loop nests and general loop structures subject to the precondition that the loop has no parent loop and has a single latch block. Preserves all listed analyses.

Parameters

NameDescription
LThe loop whose backedge should be removed.
DTDominator tree to update.
SEScalarEvolution to update.
LILoop info to update.
MSSAMemorySSA to update, or nullptr.