16 #ifndef LLVM_TRANSFORMS_UTILS_LOOPVERSIONING_H 17 #define LLVM_TRANSFORMS_UTILS_LOOPVERSIONING_H 29 class ScalarEvolution;
44 bool UseLAIChecks =
true);
119 Loop *NonVersionedLoop;
142 GroupToNonAliasingScopeList;
static bool Check(DecodeStatus &Out, DecodeStatus In)
This class represents lattice values for constants.
The main scalar evolution driver.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
SmallVector< Instruction *, 8 > findDefsUsedOutsideOfLoop(Loop *L)
Returns the instructions that use values defined in the loop.
void versionLoop()
Performs the CFG manipulation part of versioning the loop including the DominatorTree and LoopInfo up...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
Loop * getVersionedLoop()
Returns the versioned loop.
void annotateLoopWithNoAlias()
Annotate memory instructions in the versioned loop with no-alias metadata based on the memchecks issu...
void setAliasChecks(SmallVector< RuntimePointerChecking::PointerCheck, 4 > Checks)
Sets the runtime alias checks for versioning the loop.
void setSCEVChecks(SCEVUnionPredicate Check)
Sets the runtime SCEV checks for versioning the loop.
Drive the analysis of memory accesses in the loop.
This class emits a version of the loop where run-time checks ensure that may-alias pointers can't ove...
void annotateInstWithNoAlias(Instruction *VersionedInst, const Instruction *OrigInst)
Add the noalias annotations to VersionedInst.
void prepareNoAliasMetadata()
Set up the aliasing scopes based on the memchecks.
Represents a single loop in the control flow graph.
This class represents a composition of other SCEV predicates, and is the class that most clients will...
Loop * getNonVersionedLoop()
Returns the fall-back loop.
LoopVersioning(const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE, bool UseLAIChecks=true)
Expects LoopAccessInfo, Loop, LoopInfo, DominatorTree as input.