LLVM  14.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::MachineFunctionAnalysisManager Class Reference

An AnalysisManager<MachineFunction> that also exposes IR analysis results. More...

#include "llvm/CodeGen/MachinePassManager.h"

Inheritance diagram for llvm::MachineFunctionAnalysisManager:
Inheritance graph
[legend]
Collaboration diagram for llvm::MachineFunctionAnalysisManager:
Collaboration graph
[legend]

Public Types

using Base = AnalysisManager< MachineFunction >
 

Public Member Functions

 MachineFunctionAnalysisManager ()
 
 MachineFunctionAnalysisManager (FunctionAnalysisManager &FAM, ModuleAnalysisManager &MAM)
 
 MachineFunctionAnalysisManager (MachineFunctionAnalysisManager &&)=default
 
MachineFunctionAnalysisManageroperator= (MachineFunctionAnalysisManager &&)=default
 
template<typename PassT >
PassT::Result & getResult (Function &F)
 Get the result of an analysis pass for a Function. More...
 
template<typename PassT >
PassT::Result * getCachedResult (Function &F)
 Get the cached result of an analysis pass for a Function. More...
 
template<typename PassT >
PassT::Result & getResult (Module &M)
 Get the result of an analysis pass for a Module. More...
 
template<typename PassT >
PassT::Result * getCachedResult (Module &M)
 Get the cached result of an analysis pass for a Module. More...
 
- Public Member Functions inherited from llvm::AnalysisManager< MachineFunction >
 AnalysisManager ()
 Construct an empty analysis manager. More...
 
 AnalysisManager (AnalysisManager &&)
 
AnalysisManageroperator= (AnalysisManager &&)
 
bool empty () const
 Returns true if the analysis manager has an empty results cache. More...
 
void clear (MachineFunction &IR, llvm::StringRef Name)
 Clear any cached analysis results for a single unit of IR. More...
 
void clear ()
 Clear all analysis results cached by this AnalysisManager. More...
 
PassT::Result & getResult (MachineFunction &IR, ExtraArgTs... ExtraArgs)
 Get the result of an analysis pass for a given IR unit. More...
 
PassT::Result * getCachedResult (MachineFunction &IR) const
 Get the cached result of an analysis pass for a given IR unit. More...
 
void verifyNotInvalidated (MachineFunction &IR, typename PassT::Result *Result) const
 Verify that the given Result cannot be invalidated, assert otherwise. More...
 
bool registerPass (PassBuilderT &&PassBuilder)
 Register an analysis pass with the manager. More...
 
void invalidate (MachineFunction &IR, const PreservedAnalyses &PA)
 Invalidate cached analyses for an IR unit. More...
 

Public Attributes

FunctionAnalysisManagerFAM
 
ModuleAnalysisManagerMAM
 

Detailed Description

An AnalysisManager<MachineFunction> that also exposes IR analysis results.

Definition at line 39 of file MachinePassManager.h.

Member Typedef Documentation

◆ Base

Definition at line 41 of file MachinePassManager.h.

Constructor & Destructor Documentation

◆ MachineFunctionAnalysisManager() [1/3]

llvm::MachineFunctionAnalysisManager::MachineFunctionAnalysisManager ( )
inline

Definition at line 43 of file MachinePassManager.h.

◆ MachineFunctionAnalysisManager() [2/3]

llvm::MachineFunctionAnalysisManager::MachineFunctionAnalysisManager ( FunctionAnalysisManager FAM,
ModuleAnalysisManager MAM 
)
inline

Definition at line 44 of file MachinePassManager.h.

◆ MachineFunctionAnalysisManager() [3/3]

llvm::MachineFunctionAnalysisManager::MachineFunctionAnalysisManager ( MachineFunctionAnalysisManager &&  )
default

Member Function Documentation

◆ getCachedResult() [1/2]

template<typename PassT >
PassT::Result* llvm::MachineFunctionAnalysisManager::getCachedResult ( Function F)
inline

Get the cached result of an analysis pass for a Function.

This method never runs the analysis.

Returns
null if there is no cached result.

Definition at line 64 of file MachinePassManager.h.

References F, FAM, and llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult().

◆ getCachedResult() [2/2]

template<typename PassT >
PassT::Result* llvm::MachineFunctionAnalysisManager::getCachedResult ( Module M)
inline

Get the cached result of an analysis pass for a Module.

This method never runs the analysis.

Returns
null if there is no cached result.

Definition at line 80 of file MachinePassManager.h.

References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), M, and MAM.

◆ getResult() [1/2]

template<typename PassT >
PassT::Result& llvm::MachineFunctionAnalysisManager::getResult ( Function F)
inline

Get the result of an analysis pass for a Function.

Runs the analysis if a cached result is not available.

Definition at line 54 of file MachinePassManager.h.

References F, FAM, and llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult().

Referenced by llvm::MachineFunctionPassManager::run().

◆ getResult() [2/2]

template<typename PassT >
PassT::Result& llvm::MachineFunctionAnalysisManager::getResult ( Module M)
inline

Get the result of an analysis pass for a Module.

Runs the analysis if a cached result is not available.

Definition at line 71 of file MachinePassManager.h.

References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), M, and MAM.

◆ operator=()

MachineFunctionAnalysisManager& llvm::MachineFunctionAnalysisManager::operator= ( MachineFunctionAnalysisManager &&  )
default

Member Data Documentation

◆ FAM

FunctionAnalysisManager* llvm::MachineFunctionAnalysisManager::FAM

◆ MAM

ModuleAnalysisManager* llvm::MachineFunctionAnalysisManager::MAM

The documentation for this class was generated from the following file: