ΒΆ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::MemorySSAUpdater&,
llvm::ICFLoopSafetyInfo*,
llvm::OptimizationRemarkEmitter*,
bool AllowSpeculation)
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::MemorySSAUpdater&,
llvm::ICFLoopSafetyInfo*,
llvm::OptimizationRemarkEmitter*,
bool AllowSpeculation)
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.\p AllowSpeculation is whether values should be hoisted even if they are not guaranteed to execute in the loop, but are safe to speculatively execute.
Declared at: llvm/include/llvm/Transforms/Utils/LoopUtils.h:210
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::MemorySSAUpdater&
- llvm::ICFLoopSafetyInfo*
- llvm::OptimizationRemarkEmitter*
- bool AllowSpeculation