#include "AMDGPUMemoryUtils.h"
#include "AMDGPU.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/MemorySSA.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/ReplaceConstant.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace llvm::AMDGPU {
Align getAlign(const DataLayout &DL, const GlobalVariable *GV) { … }
bool isDynamicLDS(const GlobalVariable &GV) { … }
bool isLDSVariableToLower(const GlobalVariable &GV) { … }
bool eliminateConstantExprUsesOfLDSFromAllInstructions(Module &M) { … }
void getUsesOfLDSByFunction(const CallGraph &CG, Module &M,
FunctionVariableMap &kernels,
FunctionVariableMap &Functions) { … }
bool isKernelLDS(const Function *F) { … }
LDSUsesInfoTy getTransitiveUsesOfLDS(const CallGraph &CG, Module &M) { … }
void removeFnAttrFromReachable(CallGraph &CG, Function *KernelRoot,
ArrayRef<StringRef> FnAttrs) { … }
bool isReallyAClobber(const Value *Ptr, MemoryDef *Def, AAResults *AA) { … }
bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA,
AAResults *AA) { … }
}