LLVM 18.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]

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

Public Attributes

FunctionAnalysisManagerFAM
 
ModuleAnalysisManagerMAM
 

Detailed Description

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

Definition at line 41 of file MachinePassManager.h.

Member Typedef Documentation

◆ Base

Definition at line 43 of file MachinePassManager.h.

Constructor & Destructor Documentation

◆ MachineFunctionAnalysisManager() [1/3]

llvm::MachineFunctionAnalysisManager::MachineFunctionAnalysisManager ( )
inline

Definition at line 45 of file MachinePassManager.h.

◆ MachineFunctionAnalysisManager() [2/3]

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

Definition at line 46 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 66 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 82 of file MachinePassManager.h.

References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), 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 56 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 73 of file MachinePassManager.h.

References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), 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: