25 cl::desc(
"Enable MemorySSA dependency for loop pass manager"));
54 bool invalidateMemorySSAAnalysis =
false;
63 invalidateMemorySSAAnalysis) {
69 for (Loop *L : PreOrderLoops) {
71 InnerAM->clear(*L,
"<possibly invalidated loop>");
90 bool AreLoopAnalysesPreserved =
99 for (Loop *L :
reverse(PreOrderLoops)) {
105 if (
auto *OuterProxy =
107 for (
const auto &OuterInvalidationPair :
108 OuterProxy->getOuterInvalidations()) {
109 AnalysisKey *OuterAnalysisID = OuterInvalidationPair.first;
110 const auto &InnerAnalysisIDs = OuterInvalidationPair.second;
114 for (
AnalysisKey *InnerAnalysisID : InnerAnalysisIDs)
115 InnerPA->
abandon(InnerAnalysisID);
122 InnerAM->invalidate(*L, *InnerPA);
128 if (!AreLoopAnalysesPreserved)
129 InnerAM->invalidate(*L, PA);
139 FunctionAnalysisManager &AM) {
void abandon()
Mark an analysis as abandoned.
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Trigger the invalidation of some other analysis pass if not already handled and return whether it was...
PreservedAnalyses getLoopPassPreservedAnalyses()
Returns the minimum set of Analyses that all loop passes must preserve.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This class represents lattice values for constants.
This is the interface for a simple mod/ref and alias analysis over globals.
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA, typename AnalysisManager< IRUnitT, ExtraArgTs... >::Invalidator &Inv)
Handler for invalidation of the outer IR unit, IRUnitT.
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
Analysis pass which computes a DominatorTree.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
This is the interface for a SCEV-based alias analysis.
Analysis pass that exposes the LoopInfo for a function.
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
This header provides classes for managing per-loop analyses.
initializer< Ty > init(const Ty &Val)
A set of analyses that are preserved following a run of a transformation pass.
A manager for alias analyses.
Analysis pass providing a never-invalidated alias analysis result.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
Analysis pass providing a never-invalidated alias analysis result.
A function analysis which provides an AssumptionCache.
An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR uni...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Result run(IRUnitT &IR, AnalysisManager< IRUnitT, ExtraArgTs... > &AM, ExtraArgTs...)
Run the analysis pass and create our proxy result object.
An analysis that produces MemorySSA for a function.
Result(AnalysisManagerT &InnerAM)
Analysis pass that exposes the ScalarEvolution for a function.
Analysis pass providing a never-invalidated alias analysis result.
Represents a single loop in the control flow graph.
void preserve()
Mark an analysis as preserved.
API to communicate dependencies between analyses during invalidation.
This templated class represents "all analyses that operate over <a particular IR unit>" (e...
This file exposes an interface to building/using memory SSA to walk memory instructions using a use/d...
This is the interface for LLVM's primary stateless and local alias analysis.
A container for analyses that lazily runs them and caches their results.
A special type used by analysis passes to provide an address that identifies that particular analysis...
bool allAnalysesInSetPreserved() const
Directly test whether a set of analyses is preserved.
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...
cl::opt< bool > EnableMSSALoopDependency
Enables memory ssa as a dependency for loop passes.