Index: lib/Target/NVPTX/NVPTXTargetTransformInfo.h =================================================================== --- lib/Target/NVPTX/NVPTXTargetTransformInfo.h +++ lib/Target/NVPTX/NVPTXTargetTransformInfo.h @@ -52,6 +52,8 @@ bool isSourceOfDivergence(const Value *V); + double getInliningThresholdMultiplier(const Function *Caller); + int getArithmeticInstrCost( unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue, Index: lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp =================================================================== --- lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp +++ lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp @@ -46,6 +46,13 @@ } } +double +NVPTXTTIImpl::getInliningThresholdMultiplier(const Function * /* Caller */) { + // Increase the inlining cost threshold by a factor of 5, reflecting that + // calls are particularly expensive in NVPTX. + return 5; +} + bool NVPTXTTIImpl::isSourceOfDivergence(const Value *V) { // Without inter-procedural analysis, we conservatively assume that arguments // to __device__ functions are divergent.