Lines Matching refs:TargetTransformInfo
1 //===- llvm/Analysis/TargetTransformInfo.cpp ------------------------------===//
11 #include "llvm/Analysis/TargetTransformInfo.h"
22 // Setup the analysis group to manage the TargetTransformInfo passes.
23 INITIALIZE_ANALYSIS_GROUP(TargetTransformInfo, "Target Information", NoTTI)
24 char TargetTransformInfo::ID = 0;
26 TargetTransformInfo::~TargetTransformInfo() {
29 void TargetTransformInfo::pushTTIStack(Pass *P) {
31 PrevTTI = &P->getAnalysis<TargetTransformInfo>();
34 for (TargetTransformInfo *PTTI = PrevTTI; PTTI; PTTI = PTTI->PrevTTI)
38 void TargetTransformInfo::popTTIStack() {
42 for (TargetTransformInfo *PTTI = PrevTTI; PTTI; PTTI = PTTI->PrevTTI)
48 void TargetTransformInfo::getAnalysisUsage(AnalysisUsage &AU) const {
49 AU.addRequired<TargetTransformInfo>();
52 unsigned TargetTransformInfo::getOperationCost(unsigned Opcode, Type *Ty,
57 unsigned TargetTransformInfo::getGEPCost(
62 unsigned TargetTransformInfo::getCallCost(FunctionType *FTy,
67 unsigned TargetTransformInfo::getCallCost(const Function *F,
72 unsigned TargetTransformInfo::getCallCost(
77 unsigned TargetTransformInfo::getIntrinsicCost(
82 unsigned TargetTransformInfo::getIntrinsicCost(
87 unsigned TargetTransformInfo::getUserCost(const User *U) const {
91 bool TargetTransformInfo::hasBranchDivergence() const {
95 bool TargetTransformInfo::isLoweredToCall(const Function *F) const {
99 bool TargetTransformInfo::isLegalAddImmediate(int64_t Imm) const {
103 bool TargetTransformInfo::isLegalICmpImmediate(int64_t Imm) const {
107 bool TargetTransformInfo::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
115 int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
123 bool TargetTransformInfo::isTruncateFree(Type *Ty1, Type *Ty2) const {
127 bool TargetTransformInfo::isTypeLegal(Type *Ty) const {
131 unsigned TargetTransformInfo::getJumpBufAlignment() const {
135 unsigned TargetTransformInfo::getJumpBufSize() const {
139 bool TargetTransformInfo::shouldBuildLookupTables() const {
143 TargetTransformInfo::PopcntSupportKind
144 TargetTransformInfo::getPopcntSupport(unsigned IntTyWidthInBit) const {
148 unsigned TargetTransformInfo::getIntImmCost(const APInt &Imm, Type *Ty) const {
152 unsigned TargetTransformInfo::getNumberOfRegisters(bool Vector) const {
156 unsigned TargetTransformInfo::getRegisterBitWidth(bool Vector) const {
160 unsigned TargetTransformInfo::getMaximumUnrollFactor() const {
164 unsigned TargetTransformInfo::getArithmeticInstrCost(unsigned Opcode,
171 unsigned TargetTransformInfo::getShuffleCost(ShuffleKind Kind, Type *Tp,
176 unsigned TargetTransformInfo::getCastInstrCost(unsigned Opcode, Type *Dst,
181 unsigned TargetTransformInfo::getCFInstrCost(unsigned Opcode) const {
185 unsigned TargetTransformInfo::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
190 unsigned TargetTransformInfo::getVectorInstrCost(unsigned Opcode, Type *Val,
195 unsigned TargetTransformInfo::getMemoryOpCost(unsigned Opcode, Type *Src,
203 TargetTransformInfo::getIntrinsicInstrCost(Intrinsic::ID ID,
209 unsigned TargetTransformInfo::getNumberOfParts(Type *Tp) const {
213 unsigned TargetTransformInfo::getAddressComputationCost(Type *Tp,
220 struct NoTTI : ImmutablePass, TargetTransformInfo {
245 if (ID == &TargetTransformInfo::ID)
246 return (TargetTransformInfo*)this;
576 INITIALIZE_AG_PASS(NoTTI, TargetTransformInfo, "notti",