LLVM
15.0.0git
|
Analysis pass providing the TargetTransformInfo
.
More...
#include "llvm/Analysis/TargetTransformInfo.h"
Public Types | |
typedef TargetTransformInfo | Result |
Public Member Functions | |
TargetIRAnalysis () | |
Default construct a target IR analysis. More... | |
TargetIRAnalysis (std::function< Result(const Function &)> TTICallback) | |
Construct an IR analysis pass around a target-provide callback. More... | |
TargetIRAnalysis (const TargetIRAnalysis &Arg) | |
TargetIRAnalysis (TargetIRAnalysis &&Arg) | |
TargetIRAnalysis & | operator= (const TargetIRAnalysis &RHS) |
TargetIRAnalysis & | operator= (TargetIRAnalysis &&RHS) |
Result | run (const Function &F, FunctionAnalysisManager &) |
![]() | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
![]() | |
static AnalysisKey * | ID () |
Returns an opaque, unique ID for this analysis type. More... | |
![]() | |
static StringRef | name () |
Gets the name of the pass we are mixed into. More... | |
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 2479 of file TargetTransformInfo.h.
Definition at line 2481 of file TargetTransformInfo.h.
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 1184 of file TargetTransformInfo.cpp.
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 1186 of file TargetTransformInfo.cpp.
|
inline |
Definition at line 2496 of file TargetTransformInfo.h.
|
inline |
Definition at line 2498 of file TargetTransformInfo.h.
|
inline |
Definition at line 2500 of file TargetTransformInfo.h.
References RHS.
|
inline |
Definition at line 2504 of file TargetTransformInfo.h.
TargetIRAnalysis::Result TargetIRAnalysis::run | ( | const Function & | F, |
FunctionAnalysisManager & | |||
) |
Definition at line 1190 of file TargetTransformInfo.cpp.
References F.
Referenced by computeHeuristicUnrollFactor(), and llvm::TargetTransformInfoWrapperPass::getTTI().