LLVM 20.0.0git
|
API to communicate dependencies between analyses during invalidation. More...
#include "llvm/IR/PassManager.h"
Public Member Functions | |
template<typename PassT > | |
bool | invalidate (IRUnitT &IR, const PreservedAnalyses &PA) |
Trigger the invalidation of some other analysis pass if not already handled and return whether it was in fact invalidated. | |
bool | invalidate (AnalysisKey *ID, IRUnitT &IR, const PreservedAnalyses &PA) |
A type-erased variant of the above invalidate method with the same core API other than passing an analysis ID rather than an analysis type parameter. | |
Friends | |
class | AnalysisManager |
API to communicate dependencies between analyses during invalidation.
When an analysis result embeds handles to other analysis results, it needs to be invalidated both when its own information isn't preserved and when any of its embedded analysis results end up invalidated. We pass an Invalidator
object as an argument to invalidate()
in order to let the analysis results themselves define the dependency graph on the fly. This lets us avoid building an explicit representation of the dependencies between analysis results.
Definition at line 292 of file PassManager.h.
|
inline |
A type-erased variant of the above invalidate method with the same core API other than passing an analysis ID rather than an analysis type parameter.
This is sadly less efficient than the above routine, which leverages the type parameter to avoid the type erasure overhead.
Definition at line 324 of file PassManager.h.
References IR.
|
inline |
Trigger the invalidation of some other analysis pass if not already handled and return whether it was in fact invalidated.
This is expected to be called from within a given analysis result's invalidate
method to trigger a depth-first walk of all inter-analysis dependencies. The same IR
unit and PA
passed to that result's invalidate
method should in turn be provided to this routine.
The first time this is called for a given analysis pass, it will call the corresponding result's invalidate
method. Subsequent calls will use a cache of the results of that initial call. It is an error to form cyclic dependencies between analysis results.
This returns true if the given analysis's result is invalid. Any dependecies on it will become invalid as a result.
Definition at line 310 of file PassManager.h.
References IR.
Referenced by llvm::AAResults::invalidate(), llvm::DependenceInfo::invalidate(), llvm::LoopAccessInfoManager::invalidate(), llvm::MemoryDependenceResults::invalidate(), llvm::MemorySSAAnalysis::Result::invalidate(), llvm::OptimizationRemarkEmitter::invalidate(), llvm::ScalarEvolution::invalidate(), llvm::SCEVAAResult::invalidate(), llvm::BasicAAResult::invalidate(), llvm::OuterAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >::Result::invalidate(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), llvm::MachineOptimizationRemarkEmitter::invalidate(), and llvm::CGSCCAnalysisManagerModuleProxy::Result::invalidate().
|
friend |
Definition at line 329 of file PassManager.h.