diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h b/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h index a22d3a34f98c..7366d5059c9f 100644 --- a/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h +++ b/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h @@ -49,7 +49,7 @@ public: return TTI::PSK_Software; } - int getIntImmCost(const APInt &Imm, Type *Ty) { + int getIntImmCost(const APInt &Imm, Type *Ty, TTI::TargetCostKind CostKind) { assert(Ty->isIntegerTy()); if (Imm == 0) return TTI::TCC_Free; @@ -66,17 +66,19 @@ public: return 4 * TTI::TCC_Basic; } - int getIntImmCostInst(unsigned Opc, unsigned Idx, const APInt &Imm, Type *Ty) { - return getIntImmCost(Imm, Ty); + int getIntImmCostInst(unsigned Opc, unsigned Idx, const APInt &Imm, Type *Ty, + TTI::TargetCostKind CostKind) { + return getIntImmCost(Imm, Ty, CostKind); } int getIntImmCostIntrin(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, - Type *Ty) { - return getIntImmCost(Imm, Ty); + Type *Ty, TTI::TargetCostKind CostKind) { + return getIntImmCost(Imm, Ty, CostKind); } unsigned getArithmeticInstrCost( unsigned Opcode, Type *Ty, + TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput, TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info = TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo = TTI::OP_None, @@ -87,7 +89,8 @@ public: switch (ISD) { default: - return BaseT::getArithmeticInstrCost(Opcode, Ty, Opd1Info, Opd2Info, + return BaseT::getArithmeticInstrCost(Opcode, Ty, CostKind, Opd1Info, + Opd2Info, Opd1PropInfo, Opd2PropInfo); case ISD::MUL: case ISD::SDIV: @@ -98,7 +101,8 @@ public: // instruction cost was arbitrarily chosen to reduce the desirability // of emitting arithmetic instructions that are emulated in software. // TODO: Investigate the performance impact given specialized lowerings. - return 64 * BaseT::getArithmeticInstrCost(Opcode, Ty, Opd1Info, Opd2Info, + return 64 * BaseT::getArithmeticInstrCost(Opcode, Ty, CostKind, Opd1Info, + Opd2Info, Opd1PropInfo, Opd2PropInfo); } } |