#include "AMDGPU.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Pass.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace {
enum DispatchPackedOffsets { … };
enum ImplicitArgOffsets { … };
class AMDGPULowerKernelAttributes : public ModulePass { … };
Function *getBasePtrIntrinsic(Module &M, bool IsV5OrAbove) { … }
}
static bool processUse(CallInst *CI, bool IsV5OrAbove) { … }
bool AMDGPULowerKernelAttributes::runOnModule(Module &M) { … }
INITIALIZE_PASS_BEGIN(AMDGPULowerKernelAttributes, DEBUG_TYPE,
"AMDGPU Kernel Attributes", false, false)
INITIALIZE_PASS_END(AMDGPULowerKernelAttributes, DEBUG_TYPE,
"AMDGPU Kernel Attributes", false, false)
char AMDGPULowerKernelAttributes::ID = …;
ModulePass *llvm::createAMDGPULowerKernelAttributesPass() { … }
PreservedAnalyses
AMDGPULowerKernelAttributesPass::run(Function &F, FunctionAnalysisManager &AM) { … }