#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/Target/TargetMachine.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace {
class PreloadKernelArgInfo { … };
class AMDGPULowerKernelArguments : public FunctionPass { … };
}
static BasicBlock::iterator getInsertPt(BasicBlock &BB) { … }
static bool lowerKernelArguments(Function &F, const TargetMachine &TM) { … }
bool AMDGPULowerKernelArguments::runOnFunction(Function &F) { … }
INITIALIZE_PASS_BEGIN(AMDGPULowerKernelArguments, DEBUG_TYPE,
"AMDGPU Lower Kernel Arguments", false, false)
INITIALIZE_PASS_END(AMDGPULowerKernelArguments, DEBUG_TYPE, "AMDGPU Lower Kernel Arguments",
false, false)
char AMDGPULowerKernelArguments::ID = …;
FunctionPass *llvm::createAMDGPULowerKernelArgumentsPass() { … }
PreservedAnalyses
AMDGPULowerKernelArgumentsPass::run(Function &F, FunctionAnalysisManager &AM) { … }