[NVPTX] Set NVPTXTTI::getInliningThresholdMultiplier to 5.
authorJustin Lebar <jlebar@google.com>
Fri, 15 Apr 2016 01:38:50 +0000 (01:38 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 15 Apr 2016 01:38:50 +0000 (01:38 +0000)
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

llvm-svn: 266406

llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h

index 0946a32..08ffdf1 100644 (file)
@@ -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,