23 #define DEBUG_TYPE "tti"
37 : TTIImpl(new
Model<NoTTIImpl>(NoTTIImpl(DL))) {}
42 : TTIImpl(std::move(Arg.TTIImpl)) {}
45 TTIImpl = std::move(RHS.TTIImpl);
51 return TTIImpl->getOperationCost(Opcode, Ty, OpTy);
56 return TTIImpl->getCallCost(FTy, NumArgs);
62 return TTIImpl->getCallCost(F, Arguments);
68 return TTIImpl->getIntrinsicCost(IID, RetTy, Arguments);
72 return TTIImpl->getUserCost(U);
76 return TTIImpl->hasBranchDivergence();
80 return TTIImpl->isSourceOfDivergence(V);
84 return TTIImpl->isLoweredToCall(F);
89 return TTIImpl->getUnrollingPreferences(L, UP);
93 return TTIImpl->isLegalAddImmediate(Imm);
97 return TTIImpl->isLegalICmpImmediate(Imm);
104 unsigned AddrSpace)
const {
105 return TTIImpl->isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg,
110 int Consecutive)
const {
111 return TTIImpl->isLegalMaskedStore(DataType, Consecutive);
115 int Consecutive)
const {
116 return TTIImpl->isLegalMaskedLoad(DataType, Consecutive);
123 unsigned AddrSpace)
const {
124 return TTIImpl->getScalingFactorCost(Ty, BaseGV, BaseOffset, HasBaseReg,
129 return TTIImpl->isTruncateFree(Ty1, Ty2);
133 return TTIImpl->isProfitableToHoist(I);
137 return TTIImpl->isTypeLegal(Ty);
141 return TTIImpl->getJumpBufAlignment();
145 return TTIImpl->getJumpBufSize();
149 return TTIImpl->shouldBuildLookupTables();
153 return TTIImpl->enableAggressiveInterleaving(LoopHasReductions);
158 return TTIImpl->getPopcntSupport(IntTyWidthInBit);
162 return TTIImpl->haveFastSqrt(Ty);
166 return TTIImpl->getFPOpCost(Ty);
170 return TTIImpl->getIntImmCost(Imm, Ty);
175 return TTIImpl->getIntImmCost(Opcode, Idx, Imm, Ty);
180 return TTIImpl->getIntImmCost(IID, Idx, Imm, Ty);
184 return TTIImpl->getNumberOfRegisters(Vector);
188 return TTIImpl->getRegisterBitWidth(Vector);
192 return TTIImpl->getMaxInterleaveFactor(VF);
199 return TTIImpl->getArithmeticInstrCost(Opcode, Ty, Opd1Info, Opd2Info,
200 Opd1PropInfo, Opd2PropInfo);
204 int Index,
Type *SubTp)
const {
205 return TTIImpl->getShuffleCost(Kind, Ty, Index, SubTp);
210 return TTIImpl->getCastInstrCost(Opcode, Dst, Src);
214 return TTIImpl->getCFInstrCost(Opcode);
218 Type *CondTy)
const {
219 return TTIImpl->getCmpSelInstrCost(Opcode, ValTy, CondTy);
223 unsigned Index)
const {
224 return TTIImpl->getVectorInstrCost(Opcode, Val, Index);
230 return TTIImpl->getMemoryOpCost(Opcode, Src, Alignment, AddressSpace);
237 return TTIImpl->getMaskedMemoryOpCost(Opcode, Src, Alignment, AddressSpace);
243 return TTIImpl->getInterleavedMemoryOpCost(Opcode, VecTy, Factor, Indices,
244 Alignment, AddressSpace);
250 return TTIImpl->getIntrinsicInstrCost(ID, RetTy, Tys);
255 return TTIImpl->getCallInstrCost(F, RetTy, Tys);
259 return TTIImpl->getNumberOfParts(Tp);
263 bool IsComplex)
const {
264 return TTIImpl->getAddressComputationCost(Tp, IsComplex);
268 bool IsPairwiseForm)
const {
269 return TTIImpl->getReductionCost(Opcode, Ty, IsPairwiseForm);
274 return TTIImpl->getCostOfKeepingLiveOverCall(Tys);
279 return TTIImpl->getTgtMemIntrinsic(Inst, Info);
284 return TTIImpl->getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
289 return TTIImpl->hasCompatibleFunctionAttributes(Caller, Callee);
298 : TTICallback(TTICallback) {}
301 return TTICallback(F);
304 char TargetIRAnalysis::PassID;
312 "Target Transform Information",
false,
true)
A parsed version of the target data layout string in and methods for querying it. ...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
ImmutablePass * createTargetTransformInfoWrapperPass(TargetIRAnalysis TIRA)
Create an analysis pass wrapper around a TTI object.
Analysis pass providing the TargetTransformInfo.
FunctionType - Class to represent function types.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void initializeTargetTransformInfoWrapperPassPass(PassRegistry &)
The instances of the Type class are immutable: once they are created, they are never changed...
TargetIRAnalysis()
Default construct a target IR analysis.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
ImmutablePass class - This class is used to provide information that does not need to be run...
Module.h This file contains the declarations for the Module class.
Class for arbitrary precision integers.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
const ARM::ArchExtKind Kind
TargetTransformInfo Result
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
print Print MemDeps of function
Information about a load/store intrinsic defined by the target.
IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic functions.