15#ifndef LLVM_TRANSFORMS_UTILS_LOOPVERSIONING_H
16#define LLVM_TRANSFORMS_UTILS_LOOPVERSIONING_H
29struct RuntimeCheckingPtrGroup;
30typedef std::pair<
const RuntimeCheckingPtrGroup *,
31 const RuntimeCheckingPtrGroup *>
117 Loop *NonVersionedLoop =
nullptr;
124 SmallVector<RuntimePointerCheck, 4> AliasChecks;
127 const SCEVPredicate &Preds;
131 DenseMap<const Value *, const RuntimeCheckingPtrGroup *> PtrToGroup;
134 DenseMap<const RuntimeCheckingPtrGroup *, MDNode *> GroupToScope;
137 DenseMap<const RuntimeCheckingPtrGroup *, MDNode *>
138 GroupToNonAliasingScopeList;
141 const LoopAccessInfo &LAI;
This header defines various interfaces for pass management in LLVM.
FunctionAnalysisManager FAM
A container for analyses that lazily runs them and caches their results.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Drive the analysis of memory accesses in the loop.
Expose LoopVersioning as a pass.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)
This class emits a version of the loop where run-time checks ensure that may-alias pointers can't ove...
void annotateLoopWithNoAlias()
Annotate memory instructions in the versioned loop with no-alias metadata based on the memchecks issu...
Loop * getVersionedLoop()
Returns the versioned loop.
void prepareNoAliasMetadata()
Set up the aliasing scopes based on the memchecks.
void annotateInstWithNoAlias(Instruction *VersionedInst, const Instruction *OrigInst)
Add the noalias annotations to VersionedInst.
void versionLoop()
Performs the CFG manipulation part of versioning the loop including the DominatorTree and LoopInfo up...
Loop * getNonVersionedLoop()
Returns the fall-back loop.
Represents a single loop in the control flow graph.
A set of analyses that are preserved following a run of a transformation pass.
The main scalar evolution driver.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is an optimization pass for GlobalISel generic memory operations.
std::pair< const RuntimeCheckingPtrGroup *, const RuntimeCheckingPtrGroup * > RuntimePointerCheck
A memcheck which made up of a pair of grouped pointers.
SmallVector< Instruction *, 8 > findDefsUsedOutsideOfLoop(Loop *L)
Returns the instructions that use values defined in the loop.
ArrayRef(const T &OneElt) -> ArrayRef< T >
ValueMap< const Value *, WeakTrackingVH > ValueToValueMapTy
A CRTP mix-in to automatically provide informational APIs needed for passes.