LLVM  8.0.1
Macros | Functions | Variables
AMDGPUInline.cpp File Reference

This is AMDGPU specific replacement of the standard inliner. More...

#include "AMDGPU.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/IPO/Inliner.h"
Include dependency graph for AMDGPUInline.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "inline"
 

Functions

 INITIALIZE_PASS_BEGIN (AMDGPUInliner, "amdgpu-inline", "AMDGPU Function Integration/Inlining", false, false) INITIALIZE_PASS_END(AMDGPUInliner
 
static bool isWrapperOnlyCall (CallSite CS)
 

Variables

static cl::opt< int > ArgAllocaCost ("amdgpu-inline-arg-alloca-cost", cl::Hidden, cl::init(2200), cl::desc("Cost of alloca argument"))
 
static cl::opt< unsignedArgAllocaCutoff ("amdgpu-inline-arg-alloca-cutoff", cl::Hidden, cl::init(256), cl::desc("Maximum alloca size to use for inline cost"))
 
amdgpu inline
 
amdgpu AMDGPU Function Integration Inlining
 
amdgpu AMDGPU Function Integration false
 

Detailed Description

This is AMDGPU specific replacement of the standard inliner.

The main purpose is to account for the fact that calls not only expensive on the AMDGPU, but much more expensive if a private memory pointer is passed to a function as an argument. In this situation, we are unable to eliminate private memory in the caller unless inlined and end up with slow and expensive scratch access. Thus, we boost the inline threshold for such functions here.

Definition in file AMDGPUInline.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "inline"

Definition at line 40 of file AMDGPUInline.cpp.

Referenced by isWrapperOnlyCall().

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( AMDGPUInliner  ,
"amdgpu-inline ,
"AMDGPU Function Integration/Inlining ,
false  ,
false   
)

◆ isWrapperOnlyCall()

static bool isWrapperOnlyCall ( CallSite  CS)
static

Variable Documentation

◆ ArgAllocaCost

cl::opt<int> ArgAllocaCost("amdgpu-inline-arg-alloca-cost", cl::Hidden, cl::init(2200), cl::desc("Cost of alloca argument"))
static

◆ ArgAllocaCutoff

cl::opt<unsigned> ArgAllocaCutoff("amdgpu-inline-arg-alloca-cutoff", cl::Hidden, cl::init(256), cl::desc("Maximum alloca size to use for inline cost"))
static

◆ false

amdgpu AMDGPU Function Integration false

Definition at line 89 of file AMDGPUInline.cpp.

◆ inline

amdgpu inline

Definition at line 89 of file AMDGPUInline.cpp.

◆ Inlining

amdgpu AMDGPU Function Integration Inlining

Definition at line 89 of file AMDGPUInline.cpp.