LLVM 24.0.0git
LoopLoadElimination.cpp File Reference

Go to the source code of this file.

Macros

#define LLE_OPTION   "loop-load-elim"
#define DEBUG_TYPE   LLE_OPTION

Functions

 STATISTIC (NumLoopLoadEliminted, "Number of loads eliminated by LLE")
static bool doesStoreDominatesAllLatches (BasicBlock *StoreBlock, Loop *L, DominatorTree *DT)
 Check if the store dominates all latches, so as long as there is no intervening store this value will be loaded in the next iteration.
static bool isLoadConditional (LoadInst *Load, Loop *L)
 Return true if the load is not executed on all paths in the loop.
static bool eliminateLoadsAcrossLoops (Function &F, LoopInfo &LI, DominatorTree &DT, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, ScalarEvolution *SE, AssumptionCache *AC, LoopAccessInfoManager &LAIs)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   LLE_OPTION

Definition at line 66 of file LoopLoadElimination.cpp.

◆ LLE_OPTION

#define LLE_OPTION   "loop-load-elim"

Definition at line 65 of file LoopLoadElimination.cpp.

Function Documentation

◆ doesStoreDominatesAllLatches()

bool doesStoreDominatesAllLatches ( BasicBlock * StoreBlock,
Loop * L,
DominatorTree * DT )
static

Check if the store dominates all latches, so as long as there is no intervening store this value will be loaded in the next iteration.

Definition at line 144 of file LoopLoadElimination.cpp.

References llvm::all_of(), and llvm::DominatorTree::dominates().

◆ eliminateLoadsAcrossLoops()

◆ isLoadConditional()

bool isLoadConditional ( LoadInst * Load,
Loop * L )
static

Return true if the load is not executed on all paths in the loop.

Definition at line 154 of file LoopLoadElimination.cpp.

References llvm::Load.

◆ STATISTIC()

STATISTIC ( NumLoopLoadEliminted ,
"Number of loads eliminated by LLE"  )

References llvm::Load, and llvm::Store.