[llvm] r266406 - [NVPTX] Set NVPTXTTI::getInliningThresholdMultiplier to 5.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 18:38:50 PDT 2016


Author: jlebar
Date: Thu Apr 14 20:38:50 2016
New Revision: 266406

URL: http://llvm.org/viewvc/llvm-project?rev=266406&view=rev
Log:
[NVPTX] Set NVPTXTTI::getInliningThresholdMultiplier to 5.

Summary:
Calls on NVPTX are unusually expensive (for one thing, lots of state
needs to be saved to memory, which is slow), so make the inlininer much
more aggressive.

Reviewers: chandlerc

Subscribers: jholewinski, llvm-commits, tra

Differential Revision: http://reviews.llvm.org/D18561

Modified:
    llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h

Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h?rev=266406&r1=266405&r2=266406&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h Thu Apr 14 20:38:50 2016
@@ -52,6 +52,10 @@ public:
 
   bool isSourceOfDivergence(const Value *V);
 
+  // Increase the inlining cost threshold by a factor of 5, reflecting that
+  // calls are particularly expensive in NVPTX.
+  unsigned getInliningThresholdMultiplier() { return 5; }
+
   int getArithmeticInstrCost(
       unsigned Opcode, Type *Ty,
       TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue,




More information about the llvm-commits mailing list