ΒΆint rewriteLoopExitValues(
    llvm::Loop* L,
    llvm::LoopInfo* LI,
    llvm::TargetLibraryInfo* TLI,
    llvm::ScalarEvolution* SE,
    const llvm::TargetTransformInfo* TTI,
    llvm::SCEVExpander& Rewriter,
    llvm::DominatorTree* DT,
    llvm::ReplaceExitVal ReplaceExitValue,
    SmallVector<llvm::WeakTrackingVH, 16>&
        DeadInsts)

Description

If the final value of any expressions that are recurrent in the loop can be computed, substitute the exit values from the loop into any instructions outside of the loop that use the final values of the current expressions. Return the number of loop exit values that have been replaced, and the corresponding phi node will be added to DeadInsts.

Declared at: llvm/include/llvm/Transforms/Utils/LoopUtils.h:451

Parameters

llvm::Loop* L
llvm::LoopInfo* LI
llvm::TargetLibraryInfo* TLI
llvm::ScalarEvolution* SE
const llvm::TargetTransformInfo* TTI
llvm::SCEVExpander& Rewriter
llvm::DominatorTree* DT
llvm::ReplaceExitVal ReplaceExitValue
SmallVector<llvm::WeakTrackingVH, 16>& DeadInsts