#include "AMDGPU.h"
#include "AMDGPUMemoryUtils.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemorySSA.h"
#include "llvm/Analysis/UniformityAnalysis.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/InitializePasses.h"
#define DEBUG_TYPE …
usingnamespacellvm;
namespace {
class AMDGPUAnnotateUniformValues
: public InstVisitor<AMDGPUAnnotateUniformValues> { … };
}
void AMDGPUAnnotateUniformValues::visitBranchInst(BranchInst &I) { … }
void AMDGPUAnnotateUniformValues::visitLoadInst(LoadInst &I) { … }
PreservedAnalyses
AMDGPUAnnotateUniformValuesPass::run(Function &F,
FunctionAnalysisManager &FAM) { … }
class AMDGPUAnnotateUniformValuesLegacy : public FunctionPass { … };
bool AMDGPUAnnotateUniformValuesLegacy::runOnFunction(Function &F) { … }
INITIALIZE_PASS_BEGIN(AMDGPUAnnotateUniformValuesLegacy, DEBUG_TYPE,
"Add AMDGPU uniform metadata", false, false)
INITIALIZE_PASS_DEPENDENCY(UniformityInfoWrapperPass)
INITIALIZE_PASS_DEPENDENCY(MemorySSAWrapperPass)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
INITIALIZE_PASS_END(AMDGPUAnnotateUniformValuesLegacy, DEBUG_TYPE,
"Add AMDGPU uniform metadata", false, false)
char AMDGPUAnnotateUniformValuesLegacy::ID = …;
FunctionPass *llvm::createAMDGPUAnnotateUniformValuesLegacy() { … }