[AMDGPU] Do not check max-bb for a single block callee
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 2 Mar 2021 00:13:13 +0000 (16:13 -0800)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 2 Mar 2021 03:48:50 +0000 (19:48 -0800)
commit7c724a896f93c97fe75db6f37b0995c9b35e0b82
treecdc5b82af8020cd92bec20ad4312708cb84cb88f
parentea1a1ebbc673d810f1abf6cb58a40b5ec916ff07
[AMDGPU] Do not check max-bb for a single block callee

-amdgpu-inline-max-bb option could lead to a suboptimal
codegen preventing inlining of really simple functions
including pure wrapper calls. Relax the cutoff by allowing
to call a function with a single block on the grounds
that it will not increase total number of blocks after
inlining.

Differential Revision: https://reviews.llvm.org/D97744
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/test/CodeGen/AMDGPU/amdgpu-inline.ll