29bool FunctionAnalysisManagerModuleProxy::Result::invalidate(
51 bool AreFunctionAnalysesPreserved =
57 std::optional<PreservedAnalyses> FunctionPA;
62 if (
auto *OuterProxy =
64 for (
const auto &OuterInvalidationPair :
65 OuterProxy->getOuterInvalidations()) {
66 AnalysisKey *OuterAnalysisID = OuterInvalidationPair.first;
67 const auto &InnerAnalysisIDs = OuterInvalidationPair.second;
71 for (
AnalysisKey *InnerAnalysisID : InnerAnalysisIDs)
72 FunctionPA->
abandon(InnerAnalysisID);
79 InnerAM->invalidate(
F, *FunctionPA);
85 if (!AreFunctionAnalysesPreserved)
86 InnerAM->invalidate(
F, PA);
97 if (EagerlyInvalidate)
100 Pass->printPipeline(
OS, MapClassName2PassName);
115 if (
F.isDeclaration())
135 PA.intersect(std::move(PassPA));
151 OS <<
"module \"" <<
IR.getName() <<
"\"";
157 OS <<
"function \"" <<
IR.getName() <<
"\"";
Module.h This file contains the declarations for the Module class.
This header defines various interfaces for pass management in LLVM.
Legalize the Machine IR a function s Machine IR
FunctionAnalysisManager FAM
Provides implementations for PassManager and AnalysisManager template methods.
This templated class represents "all analyses that operate over <a particular IR unit>" (e....
API to communicate dependencies between analyses during invalidation.
bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Trigger the invalidation of some other analysis pass if not already handled and return whether it was...
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Runs the function pass across every function in the module.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
A Module instance is used to store all the information related to an LLVM module.
An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR uni...
Pseudo-analysis pass that exposes the PassInstrumentation to pass managers.
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks regis...
void runAfterPass(const PassT &Pass, const IRUnitT &IR, const PreservedAnalyses &PA) const
AfterPass instrumentation point - takes Pass instance that has just been executed and constant refere...
bool runBeforePass(const PassT &Pass, const IRUnitT &IR) const
BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it...
Manages a sequence of passes over a particular unit of IR.
Pass interface - Implemented by all 'passes'.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
bool areAllPreserved() const
Test whether all analyses are preserved (and none are abandoned).
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
bool allAnalysesInSetPreserved() const
Directly test whether a set of analyses is preserved.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
void abandon()
Mark an analysis as abandoned.
StringRef - Represent a constant reference to a string, i.e.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
void printIRUnitNameForStackTrace< Function >(raw_ostream &OS, const Function &IR)
void printIRUnitNameForStackTrace< Module >(raw_ostream &OS, const Module &IR)
A special type used by analysis passes to provide an address that identifies that particular analysis...
A special type used to provide an address that identifies a set of related analyses.