Lines Matching defs:TargetTransformInfo

1 //===- llvm/Analysis/TargetTransformInfo.cpp ------------------------------===//
10 #include "llvm/Analysis/TargetTransformInfo.h"
23 // Setup the analysis group to manage the TargetTransformInfo passes.
24 INITIALIZE_ANALYSIS_GROUP(TargetTransformInfo, "Target Information", NoTTI)
25 char TargetTransformInfo::ID = 0;
27 TargetTransformInfo::~TargetTransformInfo() {
30 void TargetTransformInfo::pushTTIStack(Pass *P) {
32 PrevTTI = &P->getAnalysis<TargetTransformInfo>();
35 for (TargetTransformInfo *PTTI = PrevTTI; PTTI; PTTI = PTTI->PrevTTI)
39 void TargetTransformInfo::getAnalysisUsage(AnalysisUsage &AU) const {
40 AU.addRequired<TargetTransformInfo>();
43 unsigned TargetTransformInfo::getOperationCost(unsigned Opcode, Type *Ty,
48 unsigned TargetTransformInfo::getGEPCost(
53 unsigned TargetTransformInfo::getCallCost(FunctionType *FTy,
58 unsigned TargetTransformInfo::getCallCost(const Function *F,
63 unsigned TargetTransformInfo::getCallCost(
68 unsigned TargetTransformInfo::getIntrinsicCost(
73 unsigned TargetTransformInfo::getIntrinsicCost(
78 unsigned TargetTransformInfo::getUserCost(const User *U) const {
82 bool TargetTransformInfo::hasBranchDivergence() const {
86 bool TargetTransformInfo::isLoweredToCall(const Function *F) const {
90 void TargetTransformInfo::getUnrollingPreferences(Loop *L,
95 bool TargetTransformInfo::isLegalAddImmediate(int64_t Imm) const {
99 bool TargetTransformInfo::isLegalICmpImmediate(int64_t Imm) const {
103 bool TargetTransformInfo::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
111 int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
119 bool TargetTransformInfo::isTruncateFree(Type *Ty1, Type *Ty2) const {
123 bool TargetTransformInfo::isTypeLegal(Type *Ty) const {
127 unsigned TargetTransformInfo::getJumpBufAlignment() const {
131 unsigned TargetTransformInfo::getJumpBufSize() const {
135 bool TargetTransformInfo::shouldBuildLookupTables() const {
139 TargetTransformInfo::PopcntSupportKind
140 TargetTransformInfo::getPopcntSupport(unsigned IntTyWidthInBit) const {
144 bool TargetTransformInfo::haveFastSqrt(Type *Ty) const {
148 unsigned TargetTransformInfo::getIntImmCost(const APInt &Imm, Type *Ty) const {
152 unsigned TargetTransformInfo::getIntImmCost(unsigned Opc, unsigned Idx,
157 unsigned TargetTransformInfo::getIntImmCost(Intrinsic::ID IID, unsigned Idx,
162 unsigned TargetTransformInfo::getNumberOfRegisters(bool Vector) const {
166 unsigned TargetTransformInfo::getRegisterBitWidth(bool Vector) const {
170 unsigned TargetTransformInfo::getMaximumUnrollFactor() const {
174 unsigned TargetTransformInfo::getArithmeticInstrCost(unsigned Opcode,
181 unsigned TargetTransformInfo::getShuffleCost(ShuffleKind Kind, Type *Tp,
186 unsigned TargetTransformInfo::getCastInstrCost(unsigned Opcode, Type *Dst,
191 unsigned TargetTransformInfo::getCFInstrCost(unsigned Opcode) const {
195 unsigned TargetTransformInfo::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
200 unsigned TargetTransformInfo::getVectorInstrCost(unsigned Opcode, Type *Val,
205 unsigned TargetTransformInfo::getMemoryOpCost(unsigned Opcode, Type *Src,
213 TargetTransformInfo::getIntrinsicInstrCost(Intrinsic::ID ID,
219 unsigned TargetTransformInfo::getNumberOfParts(Type *Tp) const {
223 unsigned TargetTransformInfo::getAddressComputationCost(Type *Tp,
228 unsigned TargetTransformInfo::getReductionCost(unsigned Opcode, Type *Ty,
235 struct NoTTI final : ImmutablePass, TargetTransformInfo {
261 if (ID == &TargetTransformInfo::ID)
262 return (TargetTransformInfo*)this;
619 INITIALIZE_AG_PASS(NoTTI, TargetTransformInfo, "notti",