[PATCH] D97790: [AMDGPU] Exclude always_inline from max bb threshold

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 10:22:20 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb70c483e0416: [AMDGPU] Exclude always_inline from max bb threshold (authored by rampitec).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97790/new/

https://reviews.llvm.org/D97790

Files:
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp


Index: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -1147,8 +1147,12 @@
   if (!CallerMode.isInlineCompatible(CalleeMode))
     return false;
 
+  if (Callee->hasFnAttribute(Attribute::AlwaysInline) ||
+      Callee->hasFnAttribute(Attribute::InlineHint))
+    return true;
+
   // Hack to make compile times reasonable.
-  if (InlineMaxBB && !Callee->hasFnAttribute(Attribute::InlineHint)) {
+  if (InlineMaxBB) {
     // Single BB does not increase total BB amount.
     if (Callee->size() == 1)
       return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97790.327851.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/52dc2e91/attachment-0001.bin>


More information about the llvm-commits mailing list