[PATCH] D47691: [NVPTX] Ignore target-cpu and -features for inling
Jonas Hahnfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 17 02:59:58 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334904: [NVPTX] Ignore target-cpu and -features for inlining (authored by Hahnfeld, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47691?vs=149655&id=151643#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47691
Files:
llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
Index: llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
===================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
@@ -61,6 +61,14 @@
unsigned getRegisterBitWidth(bool Vector) const { return 32; }
unsigned getMinVectorRegisterBitWidth() const { return 32; }
+ // We don't want to prevent inlining because of target-cpu and -features
+ // attributes that were added to newer versions of LLVM/Clang: There are
+ // no incompatible functions in PTX, ptxas will throw errors in such cases.
+ bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const {
+ return true;
+ }
+
// Increase the inlining cost threshold by a factor of 5, reflecting that
// calls are particularly expensive in NVPTX.
unsigned getInliningThresholdMultiplier() { return 5; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47691.151643.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180617/a5fdc723/attachment.bin>
More information about the llvm-commits
mailing list