LLVM
8.0.1
|
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"
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< unsigned > | ArgAllocaCutoff ("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 |
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.
#define DEBUG_TYPE "inline" |
Definition at line 40 of file AMDGPUInline.cpp.
Referenced by isWrapperOnlyCall().
INITIALIZE_PASS_BEGIN | ( | AMDGPUInliner | , |
"amdgpu-inline" | , | ||
"AMDGPU Function Integration/Inlining" | , | ||
false | , | ||
false | |||
) |
Definition at line 152 of file AMDGPUInline.cpp.
References llvm::Attribute::AlwaysInline, llvm::TargetTransformInfo::areInlineCompatible(), Callee, llvm::dbgs(), DEBUG_TYPE, llvm::InlineParams::DefaultThreshold, F(), llvm::InlineCost::getAlways(), llvm::Function::getBasicBlockList(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCaller(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::getInlineCost(), llvm::Value::getName(), llvm::InlineCost::getNever(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::hasFnAttr(), I, llvm::GlobalValue::isDeclaration(), llvm::isInlineViable(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isNoInline(), LLVM_DEBUG, llvm::None, and llvm::Function::size().
|
static |
Referenced by llvm::createAMDGPUFunctionInliningPass().
|
static |
Referenced by llvm::createAMDGPUFunctionInliningPass().
amdgpu AMDGPU Function Integration false |
Definition at line 89 of file AMDGPUInline.cpp.
amdgpu inline |
Definition at line 89 of file AMDGPUInline.cpp.
amdgpu AMDGPU Function Integration Inlining |
Definition at line 89 of file AMDGPUInline.cpp.