diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:31:46 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-06-13 19:37:19 +0000 |
commit | e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 (patch) | |
tree | 94f04805f47bb7c59ae29690d8952b6074fff602 /contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h | |
parent | bb130ff39747b94592cb26d71b7cb097b9a4ea6b (diff) | |
parent | b60736ec1405bb0a8dd40989f67ef4c93da068ab (diff) | |
download | src-e8d8bef961a50d4dc22501cde4fb9fb0be1b2532.tar.gz src-e8d8bef961a50d4dc22501cde4fb9fb0be1b2532.zip |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h index fd8889ea5c0d..44de40d4aa7f 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h @@ -13,13 +13,7 @@ #define LLVM_LIB_TARGET_AMDGPU_AMDGPUALIASANALYSIS_H #include "AMDGPU.h" -#include "llvm/ADT/Triple.h" #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/Pass.h" -#include <algorithm> -#include <memory> namespace llvm { @@ -34,15 +28,17 @@ class AMDGPUAAResult : public AAResultBase<AMDGPUAAResult> { const DataLayout &DL; public: - explicit AMDGPUAAResult(const DataLayout &DL, Triple T) : AAResultBase(), - DL(DL) {} + explicit AMDGPUAAResult(const DataLayout &DL) : AAResultBase(), DL(DL) {} AMDGPUAAResult(AMDGPUAAResult &&Arg) : AAResultBase(std::move(Arg)), DL(Arg.DL) {} /// Handle invalidation events from the new pass manager. /// /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } + bool invalidate(Function &, const PreservedAnalyses &, + FunctionAnalysisManager::Invalidator &Inv) { + return false; + } AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI); @@ -54,14 +50,13 @@ public: class AMDGPUAA : public AnalysisInfoMixin<AMDGPUAA> { friend AnalysisInfoMixin<AMDGPUAA>; - static char PassID; + static AnalysisKey Key; public: using Result = AMDGPUAAResult; AMDGPUAAResult run(Function &F, AnalysisManager<Function> &AM) { - return AMDGPUAAResult(F.getParent()->getDataLayout(), - Triple(F.getParent()->getTargetTriple())); + return AMDGPUAAResult(F.getParent()->getDataLayout()); } }; @@ -80,8 +75,7 @@ public: const AMDGPUAAResult &getResult() const { return *Result; } bool doInitialization(Module &M) override { - Result.reset(new AMDGPUAAResult(M.getDataLayout(), - Triple(M.getTargetTriple()))); + Result.reset(new AMDGPUAAResult(M.getDataLayout())); return false; } |