diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h b/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h index 50167708163e..30c51250af61 100644 --- a/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -1157,6 +1157,12 @@ struct AnalysisGetter { return nullptr; } + /// Invalidates the analyses. Valid only when using the new pass manager. + void invalidateAnalyses() { + assert(FAM && "Can only be used from the new PM!"); + FAM->clear(); + } + AnalysisGetter(FunctionAnalysisManager &FAM, bool CachedOnly = false) : FAM(&FAM), CachedOnly(CachedOnly) {} AnalysisGetter(Pass *P, bool CachedOnly = false) @@ -1286,6 +1292,10 @@ struct InformationCache { return AssumeOnlyValues.contains(&I); } + /// Invalidates the cached analyses. Valid only when using the new pass + /// manager. + void invalidateAnalyses() { AG.invalidateAnalyses(); } + /// Return the analysis result from a pass \p AP for function \p F. template <typename AP> typename AP::Result *getAnalysisResultForFunction(const Function &F, |