LLVM  3.7.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::TargetTransformInfoImplBase Class Reference

Base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class. More...

#include <TargetTransformInfoImpl.h>

Inheritance diagram for llvm::TargetTransformInfoImplBase:
[legend]
Collaboration diagram for llvm::TargetTransformInfoImplBase:
[legend]

Public Member Functions

 TargetTransformInfoImplBase (const TargetTransformInfoImplBase &Arg)
 
 TargetTransformInfoImplBase (TargetTransformInfoImplBase &&Arg)
 
const DataLayoutgetDataLayout () const
 
unsigned getOperationCost (unsigned Opcode, Type *Ty, Type *OpTy)
 
unsigned getGEPCost (const Value *Ptr, ArrayRef< const Value * > Operands)
 
unsigned getCallCost (FunctionType *FTy, int NumArgs)
 
unsigned getIntrinsicCost (Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > ParamTys)
 
bool hasBranchDivergence ()
 
bool isSourceOfDivergence (const Value *V)
 
bool isLoweredToCall (const Function *F)
 
void getUnrollingPreferences (Loop *, TTI::UnrollingPreferences &)
 
bool isLegalAddImmediate (int64_t Imm)
 
bool isLegalICmpImmediate (int64_t Imm)
 
bool isLegalAddressingMode (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool isLegalMaskedStore (Type *DataType, int Consecutive)
 
bool isLegalMaskedLoad (Type *DataType, int Consecutive)
 
int getScalingFactorCost (Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
 
bool isTruncateFree (Type *Ty1, Type *Ty2)
 
bool isProfitableToHoist (Instruction *I)
 
bool isTypeLegal (Type *Ty)
 
unsigned getJumpBufAlignment ()
 
unsigned getJumpBufSize ()
 
bool shouldBuildLookupTables ()
 
bool enableAggressiveInterleaving (bool LoopHasReductions)
 
TTI::PopcntSupportKind getPopcntSupport (unsigned IntTyWidthInBit)
 
bool haveFastSqrt (Type *Ty)
 
unsigned getFPOpCost (Type *Ty)
 
unsigned getIntImmCost (const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getIntImmCost (Intrinsic::ID IID, unsigned Idx, const APInt &Imm, Type *Ty)
 
unsigned getNumberOfRegisters (bool Vector)
 
unsigned getRegisterBitWidth (bool Vector)
 
unsigned getMaxInterleaveFactor (unsigned VF)
 
unsigned getArithmeticInstrCost (unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info, TTI::OperandValueKind Opd2Info, TTI::OperandValueProperties Opd1PropInfo, TTI::OperandValueProperties Opd2PropInfo)
 
unsigned getShuffleCost (TTI::ShuffleKind Kind, Type *Ty, int Index, Type *SubTp)
 
unsigned getCastInstrCost (unsigned Opcode, Type *Dst, Type *Src)
 
unsigned getCFInstrCost (unsigned Opcode)
 
unsigned getCmpSelInstrCost (unsigned Opcode, Type *ValTy, Type *CondTy)
 
unsigned getVectorInstrCost (unsigned Opcode, Type *Val, unsigned Index)
 
unsigned getMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
 
unsigned getMaskedMemoryOpCost (unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace)
 
unsigned getInterleavedMemoryOpCost (unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace)
 
unsigned getIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy, ArrayRef< Type * > Tys)
 
unsigned getCallInstrCost (Function *F, Type *RetTy, ArrayRef< Type * > Tys)
 
unsigned getNumberOfParts (Type *Tp)
 
unsigned getAddressComputationCost (Type *Tp, bool)
 
unsigned getReductionCost (unsigned, Type *, bool)
 
unsigned getCostOfKeepingLiveOverCall (ArrayRef< Type * > Tys)
 
bool getTgtMemIntrinsic (IntrinsicInst *Inst, MemIntrinsicInfo &Info)
 
ValuegetOrCreateResultFromMemIntrinsic (IntrinsicInst *Inst, Type *ExpectedType)
 
bool hasCompatibleFunctionAttributes (const Function *Caller, const Function *Callee) const
 

Protected Types

typedef TargetTransformInfo TTI
 

Protected Member Functions

 TargetTransformInfoImplBase (const DataLayout &DL)
 

Protected Attributes

const DataLayoutDL
 

Detailed Description

Base class for use as a mix-in that aids implementing a TargetTransformInfo-compatible class.

Definition at line 29 of file TargetTransformInfoImpl.h.

Member Typedef Documentation

Definition at line 31 of file TargetTransformInfoImpl.h.

Constructor & Destructor Documentation

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( const DataLayout DL)
inlineexplicitprotected

Definition at line 35 of file TargetTransformInfoImpl.h.

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( const TargetTransformInfoImplBase Arg)
inline

Definition at line 39 of file TargetTransformInfoImpl.h.

llvm::TargetTransformInfoImplBase::TargetTransformInfoImplBase ( TargetTransformInfoImplBase &&  Arg)
inline

Definition at line 41 of file TargetTransformInfoImpl.h.

Member Function Documentation

bool llvm::TargetTransformInfoImplBase::enableAggressiveInterleaving ( bool  LoopHasReductions)
inline

Definition at line 227 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getAddressComputationCost ( Type Tp,
bool   
)
inline

Definition at line 309 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getArithmeticInstrCost ( unsigned  Opcode,
Type Ty,
TTI::OperandValueKind  Opd1Info,
TTI::OperandValueKind  Opd2Info,
TTI::OperandValueProperties  Opd1PropInfo,
TTI::OperandValueProperties  Opd2PropInfo 
)
inline

Definition at line 255 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getCallCost ( FunctionType FTy,
int  NumArgs 
)
inline
unsigned llvm::TargetTransformInfoImplBase::getCallInstrCost ( Function F,
Type RetTy,
ArrayRef< Type * >  Tys 
)
inline

Definition at line 303 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getCastInstrCost ( unsigned  Opcode,
Type Dst,
Type Src 
)
inline

Definition at line 268 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getCFInstrCost ( unsigned  Opcode)
inline

Definition at line 270 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getCmpSelInstrCost ( unsigned  Opcode,
Type ValTy,
Type CondTy 
)
inline

Definition at line 272 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getCostOfKeepingLiveOverCall ( ArrayRef< Type * >  Tys)
inline

Definition at line 313 of file TargetTransformInfoImpl.h.

const DataLayout& llvm::TargetTransformInfoImplBase::getDataLayout ( ) const
inline

Definition at line 43 of file TargetTransformInfoImpl.h.

References DL.

unsigned llvm::TargetTransformInfoImplBase::getFPOpCost ( Type Ty)
inline

Definition at line 235 of file TargetTransformInfoImpl.h.

References llvm::TargetTransformInfo::TCC_Basic.

unsigned llvm::TargetTransformInfoImplBase::getGEPCost ( const Value Ptr,
ArrayRef< const Value * >  Operands 
)
inline
unsigned llvm::TargetTransformInfoImplBase::getInterleavedMemoryOpCost ( unsigned  Opcode,
Type VecTy,
unsigned  Factor,
ArrayRef< unsigned Indices,
unsigned  Alignment,
unsigned  AddressSpace 
)
inline

Definition at line 290 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getIntImmCost ( const APInt Imm,
Type Ty 
)
inline
unsigned llvm::TargetTransformInfoImplBase::getIntImmCost ( unsigned  Opcode,
unsigned  Idx,
const APInt Imm,
Type Ty 
)
inline

Definition at line 239 of file TargetTransformInfoImpl.h.

References llvm::TargetTransformInfo::TCC_Free.

unsigned llvm::TargetTransformInfoImplBase::getIntImmCost ( Intrinsic::ID  IID,
unsigned  Idx,
const APInt Imm,
Type Ty 
)
inline

Definition at line 244 of file TargetTransformInfoImpl.h.

References llvm::TargetTransformInfo::TCC_Free.

unsigned llvm::TargetTransformInfoImplBase::getIntrinsicCost ( Intrinsic::ID  IID,
Type RetTy,
ArrayRef< Type * >  ParamTys 
)
inline
unsigned llvm::TargetTransformInfoImplBase::getIntrinsicInstrCost ( Intrinsic::ID  ID,
Type RetTy,
ArrayRef< Type * >  Tys 
)
inline

Definition at line 298 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getJumpBufAlignment ( )
inline

Definition at line 221 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getJumpBufSize ( )
inline

Definition at line 223 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getMaskedMemoryOpCost ( unsigned  Opcode,
Type Src,
unsigned  Alignment,
unsigned  AddressSpace 
)
inline
unsigned llvm::TargetTransformInfoImplBase::getMaxInterleaveFactor ( unsigned  VF)
inline

Definition at line 253 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getMemoryOpCost ( unsigned  Opcode,
Type Src,
unsigned  Alignment,
unsigned  AddressSpace 
)
inline

Definition at line 280 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getNumberOfParts ( Type Tp)
inline

Definition at line 307 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getNumberOfRegisters ( bool  Vector)
inline

Definition at line 249 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getOperationCost ( unsigned  Opcode,
Type Ty,
Type OpTy 
)
inline
Value* llvm::TargetTransformInfoImplBase::getOrCreateResultFromMemIntrinsic ( IntrinsicInst Inst,
Type ExpectedType 
)
inline

Definition at line 319 of file TargetTransformInfoImpl.h.

TTI::PopcntSupportKind llvm::TargetTransformInfoImplBase::getPopcntSupport ( unsigned  IntTyWidthInBit)
inline
unsigned llvm::TargetTransformInfoImplBase::getReductionCost ( unsigned  ,
Type ,
bool   
)
inline

Definition at line 311 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getRegisterBitWidth ( bool  Vector)
inline

Definition at line 251 of file TargetTransformInfoImpl.h.

int llvm::TargetTransformInfoImplBase::getScalingFactorCost ( Type Ty,
GlobalValue BaseGV,
int64_t  BaseOffset,
bool  HasBaseReg,
int64_t  Scale,
unsigned  AddrSpace 
)
inline

Definition at line 206 of file TargetTransformInfoImpl.h.

References isLegalAddressingMode().

unsigned llvm::TargetTransformInfoImplBase::getShuffleCost ( TTI::ShuffleKind  Kind,
Type Ty,
int  Index,
Type SubTp 
)
inline

Definition at line 263 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::getTgtMemIntrinsic ( IntrinsicInst Inst,
MemIntrinsicInfo Info 
)
inline

Definition at line 315 of file TargetTransformInfoImpl.h.

void llvm::TargetTransformInfoImplBase::getUnrollingPreferences ( Loop ,
TTI::UnrollingPreferences  
)
inline

Definition at line 188 of file TargetTransformInfoImpl.h.

unsigned llvm::TargetTransformInfoImplBase::getVectorInstrCost ( unsigned  Opcode,
Type Val,
unsigned  Index 
)
inline

Definition at line 276 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::hasBranchDivergence ( )
inline

Definition at line 150 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::hasCompatibleFunctionAttributes ( const Function Caller,
const Function Callee 
) const
inline

Definition at line 324 of file TargetTransformInfoImpl.h.

References llvm::Function::getFnAttribute().

bool llvm::TargetTransformInfoImplBase::haveFastSqrt ( Type Ty)
inline

Definition at line 233 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isLegalAddImmediate ( int64_t  Imm)
inline

Definition at line 190 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isLegalAddressingMode ( Type Ty,
GlobalValue BaseGV,
int64_t  BaseOffset,
bool  HasBaseReg,
int64_t  Scale,
unsigned  AddrSpace 
)
inline

Definition at line 194 of file TargetTransformInfoImpl.h.

Referenced by getScalingFactorCost().

bool llvm::TargetTransformInfoImplBase::isLegalICmpImmediate ( int64_t  Imm)
inline

Definition at line 192 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isLegalMaskedLoad ( Type DataType,
int  Consecutive 
)
inline

Definition at line 204 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isLegalMaskedStore ( Type DataType,
int  Consecutive 
)
inline

Definition at line 202 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isLoweredToCall ( const Function F)
inline
bool llvm::TargetTransformInfoImplBase::isProfitableToHoist ( Instruction I)
inline

Definition at line 217 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isSourceOfDivergence ( const Value V)
inline

Definition at line 152 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isTruncateFree ( Type Ty1,
Type Ty2 
)
inline

Definition at line 215 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::isTypeLegal ( Type Ty)
inline

Definition at line 219 of file TargetTransformInfoImpl.h.

bool llvm::TargetTransformInfoImplBase::shouldBuildLookupTables ( )
inline

Definition at line 225 of file TargetTransformInfoImpl.h.

Member Data Documentation

const DataLayout& llvm::TargetTransformInfoImplBase::DL
protected

Definition at line 33 of file TargetTransformInfoImpl.h.

Referenced by llvm::NVPTXTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::X86TTIImpl::getCastInstrCost(), llvm::ARMTTIImpl::getCastInstrCost(), llvm::AArch64TTIImpl::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), getDataLayout(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::X86TTIImpl::getMemoryOpCost(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getNumberOfParts(), getOperationCost(), llvm::X86TTIImpl::getReductionCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getScalingFactorCost(), llvm::X86TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::AArch64TTIImpl::getVectorInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getVectorInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::haveFastSqrt(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::isLegalAddressingMode(), and llvm::BasicTTIImplBase< AMDGPUTTIImpl >::isTypeLegal().


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