|
LLVM
10.0.0
|
This is AMDGPU specific replacement of the standard inliner. More...
#include "AMDGPU.h"#include "llvm/Analysis/AssumptionCache.h"#include "llvm/Analysis/CallGraph.h"#include "llvm/Analysis/InlineCost.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/Analysis/ValueTracking.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/InitializePasses.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Transforms/IPO.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(4000), 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")) |
| static cl::opt< size_t > | MaxBB ("amdgpu-inline-max-bb", cl::Hidden, cl::init(1100), cl::desc("Maximum BB number allowed in a function after inlining" " (compile time constraint)")) |
| 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 39 of file AMDGPUInline.cpp.
Referenced by isWrapperOnlyCall().
| INITIALIZE_PASS_BEGIN | ( | AMDGPUInliner | , |
| "amdgpu-inline" | , | ||
| "AMDGPU Function Integration/Inlining" | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 159 of file AMDGPUInline.cpp.
References 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, CallBrTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getCaller(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::getInlineCost(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::getInstruction(), llvm::Value::getName(), llvm::InlineCost::getNever(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::hasFnAttr(), llvm::Function::hasFnAttribute(), I, llvm::GlobalValue::isDeclaration(), llvm::isInlineViable(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, CallBrTy, IterTy >::isNoInline(), LLVM_DEBUG, MaxBB, llvm::None, Size, and llvm::Function::size().
|
static |
Referenced by llvm::createAMDGPUFunctionInliningPass().
|
static |
Referenced by llvm::createAMDGPUFunctionInliningPass().
| amdgpu AMDGPU Function Integration false |
Definition at line 94 of file AMDGPUInline.cpp.
| amdgpu inline |
Definition at line 94 of file AMDGPUInline.cpp.
| amdgpu AMDGPU Function Integration Inlining |
Definition at line 94 of file AMDGPUInline.cpp.
|
static |
Referenced by isWrapperOnlyCall().
1.8.13