LLVM 20.0.0git
Public Types | Public Member Functions | List of all members
llvm::TargetIRAnalysis Class Reference

Analysis pass providing the TargetTransformInfo. More...

#include "llvm/Analysis/TargetTransformInfo.h"

Inheritance diagram for llvm::TargetIRAnalysis:
Inheritance graph
[legend]

Public Types

typedef TargetTransformInfo Result
 

Public Member Functions

 TargetIRAnalysis ()
 Default construct a target IR analysis.
 
 TargetIRAnalysis (std::function< Result(const Function &)> TTICallback)
 Construct an IR analysis pass around a target-provide callback.
 
 TargetIRAnalysis (const TargetIRAnalysis &Arg)
 
 TargetIRAnalysis (TargetIRAnalysis &&Arg)
 
TargetIRAnalysisoperator= (const TargetIRAnalysis &RHS)
 
TargetIRAnalysisoperator= (TargetIRAnalysis &&RHS)
 
Result run (const Function &F, FunctionAnalysisManager &)
 
- Public Member Functions inherited from llvm::PassInfoMixin< DerivedT >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::AnalysisInfoMixin< TargetIRAnalysis >
static AnalysisKeyID ()
 Returns an opaque, unique ID for this analysis type.
 
- Static Public Member Functions inherited from llvm::PassInfoMixin< DerivedT >
static StringRef name ()
 Gets the name of the pass we are mixed into.
 

Detailed Description

Analysis pass providing the TargetTransformInfo.

The core idea of the TargetIRAnalysis is to expose an interface through which LLVM targets can analyze and provide information about the middle end's target-independent IR. This supports use cases such as target-aware cost modeling of IR constructs.

This is a function analysis because much of the cost modeling for targets is done in a subtarget specific way and LLVM supports compiling different functions targeting different subtargets in order to support runtime dispatch according to the observed subtarget.

Definition at line 2984 of file TargetTransformInfo.h.

Member Typedef Documentation

◆ Result

Definition at line 2986 of file TargetTransformInfo.h.

Constructor & Destructor Documentation

◆ TargetIRAnalysis() [1/4]

TargetIRAnalysis::TargetIRAnalysis ( )

Default construct a target IR analysis.

This will use the module's datalayout to construct a baseline conservative TTI result.

Definition at line 1357 of file TargetTransformInfo.cpp.

◆ TargetIRAnalysis() [2/4]

TargetIRAnalysis::TargetIRAnalysis ( std::function< Result(const Function &)>  TTICallback)

Construct an IR analysis pass around a target-provide callback.

The callback will be called with a particular function for which the TTI is needed and must return a TTI object for that function.

Definition at line 1359 of file TargetTransformInfo.cpp.

◆ TargetIRAnalysis() [3/4]

llvm::TargetIRAnalysis::TargetIRAnalysis ( const TargetIRAnalysis Arg)
inline

Definition at line 3001 of file TargetTransformInfo.h.

◆ TargetIRAnalysis() [4/4]

llvm::TargetIRAnalysis::TargetIRAnalysis ( TargetIRAnalysis &&  Arg)
inline

Definition at line 3003 of file TargetTransformInfo.h.

Member Function Documentation

◆ operator=() [1/2]

TargetIRAnalysis & llvm::TargetIRAnalysis::operator= ( const TargetIRAnalysis RHS)
inline

Definition at line 3005 of file TargetTransformInfo.h.

References RHS.

◆ operator=() [2/2]

TargetIRAnalysis & llvm::TargetIRAnalysis::operator= ( TargetIRAnalysis &&  RHS)
inline

Definition at line 3009 of file TargetTransformInfo.h.

References RHS.

◆ run()

TargetIRAnalysis::Result TargetIRAnalysis::run ( const Function F,
FunctionAnalysisManager  
)

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