[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

llvm-svn: 266406
This commit is contained in:
Justin Lebar 2016-04-15 01:38:50 +00:00
parent 8650a4da93
commit cd5fbea67e
1 changed files with 4 additions and 0 deletions

View 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,