ΒΆbool promoteLoopAccessesToScalars(
    const SmallSetVector<llvm::Value*, 8>&,
    SmallVectorImpl<llvm::BasicBlock*>&,
    SmallVectorImpl<llvm::Instruction*>&,
    SmallVectorImpl<llvm::MemoryAccess*>&,
    llvm::PredIteratorCache&,
    llvm::LoopInfo*,
    llvm::DominatorTree*,
    const llvm::TargetLibraryInfo*,
    llvm::Loop*,
    llvm::AliasSetTracker*,
    llvm::MemorySSAUpdater*,
    llvm::ICFLoopSafetyInfo*,
    llvm::OptimizationRemarkEmitter*)

Description

Try to promote memory values to scalars by sinking stores out of the loop and moving loads to before the loop. We do this by looping over the stores in the loop, looking for stores to Must pointers which are loop invariant. It takes a set of must-alias values, Loop exit blocks vector, loop exit blocks insertion point vector, PredIteratorCache, LoopInfo, DominatorTree, Loop, AliasSet information for all instructions of the loop and loop safety information as arguments. Diagnostics is emitted via \p ORE. It returns changed status.

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

Parameters

const SmallSetVector<llvm::Value*, 8>&
SmallVectorImpl<llvm::BasicBlock*>&
SmallVectorImpl<llvm::Instruction*>&
SmallVectorImpl<llvm::MemoryAccess*>&
llvm::PredIteratorCache&
llvm::LoopInfo*
llvm::DominatorTree*
const llvm::TargetLibraryInfo*
llvm::Loop*
llvm::AliasSetTracker*
llvm::MemorySSAUpdater*
llvm::ICFLoopSafetyInfo*
llvm::OptimizationRemarkEmitter*