Go to the documentation of this file.
15 #ifndef LLVM_LIB_TARGET_BPF_BPFTARGETTRANSFORMINFO_H
16 #define LLVM_LIB_TARGET_BPF_BPFTARGETTRANSFORMINFO_H
38 TLI(ST->getTargetLowering()) {}
41 if (
Imm.getBitWidth() <= 64 && isInt<32>(
Imm.getSExtValue()))
62 ArrayRef<const Value *>
Args = ArrayRef<const Value *>(),
63 const Instruction *CxtI =
nullptr) {
73 bool IsZeroCmp)
const {
75 Options.LoadSizes = {8, 4, 2, 1};
84 #endif // LLVM_LIB_TARGET_BPF_BPFTARGETTRANSFORMINFO_H
This is an optimization pass for GlobalISel generic memory operations.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const llvm::Instruction *I=nullptr)
TTI::MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const
The instances of the Type class are immutable: once they are created, they are never changed.
int getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
InstructionCost getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, TTI::OperandValueInfo Opd1Info={TTI::OK_AnyValue, TTI::OP_None}, TTI::OperandValueInfo Opd2Info={TTI::OK_AnyValue, TTI::OP_None}, ArrayRef< const Value * > Args=ArrayRef< const Value * >(), const Instruction *CxtI=nullptr)
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
unsigned getMaxExpandSizeMemcmp(bool OptSize) const
Get maximum # of load operations permitted for memcmp.
cl::opt< unsigned > SCEVCheapExpansionBudget
Base class which can be used to help build a TTI implementation.
InstructionCost getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind, TTI::OperandValueInfo Op1Info={TTI::OK_AnyValue, TTI::OP_None}, TTI::OperandValueInfo Op2Info={TTI::OK_AnyValue, TTI::OP_None}, ArrayRef< const Value * > Args=ArrayRef< const Value * >(), const Instruction *CxtI=nullptr)
Class for arbitrary precision integers.
static cl::opt< TargetTransformInfo::TargetCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(TargetTransformInfo::TCK_RecipThroughput), cl::values(clEnumValN(TargetTransformInfo::TCK_RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(TargetTransformInfo::TCK_Latency, "latency", "Instruction latency"), clEnumValN(TargetTransformInfo::TCK_CodeSize, "code-size", "Code size"), clEnumValN(TargetTransformInfo::TCK_SizeAndLatency, "size-latency", "Code size and latency")))
static const Function * getParent(const Value *V)
int InstructionOpcodeToISD(unsigned Opcode) const
Get the ISD node that corresponds to the Instruction class opcode.
BPFTTIImpl(const BPFTargetMachine *TM, const Function &F)
@ ADD
Simple integer binary arithmetic operators.
const char LLVMTargetMachineRef TM
constexpr char Args[]
Key for Kernel::Metadata::mArgs.