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()))
51 if (Opcode == Instruction::Select)
62 ArrayRef<const Value *> Args = std::nullopt,
63 const Instruction *CxtI =
nullptr) {
73 bool IsZeroCmp)
const {
75 Options.LoadSizes = {8, 4, 2, 1};
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
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")))
Class for arbitrary precision integers.
int getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind)
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=std::nullopt, const Instruction *CxtI=nullptr)
unsigned getMaxNumArgs() const
BPFTTIImpl(const BPFTargetMachine *TM, const Function &F)
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
Base class which can be used to help build a TTI implementation.
InstructionCost getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, CmpInst::Predicate VecPred, TTI::TargetCostKind CostKind, const Instruction *I=nullptr)
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=std::nullopt, const Instruction *CxtI=nullptr)
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
int InstructionOpcodeToISD(unsigned Opcode) const
Get the ISD node that corresponds to the Instruction class opcode.
unsigned getMaxExpandSizeMemcmp(bool OptSize) const
Get maximum # of load operations permitted for memcmp.
The instances of the Type class are immutable: once they are created, they are never changed.
@ ADD
Simple integer binary arithmetic operators.
This is an optimization pass for GlobalISel generic memory operations.
cl::opt< unsigned > SCEVCheapExpansionBudget