LLVM
8.0.1
|
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. More... | |
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. More... | |
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 building an explicit representation of the dependencies between analysis results.
Definition at line 642 of file PassManager.h.
|
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 660 of file PassManager.h.
References IR.
Referenced by llvm::OptimizationRemarkEmitter::invalidate(), llvm::BasicAAResult::invalidate(), llvm::LazyValueInfo::invalidate(), llvm::AAResults::invalidate(), llvm::MemoryDependenceResults::invalidate(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), llvm::ScalarEvolution::invalidate(), llvm::OuterAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >::Result::invalidate(), and llvm::PassManager< Function >::run().
|
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 674 of file PassManager.h.
References IR.
|
friend |
Definition at line 679 of file PassManager.h.