LLVM 17.0.0git
AMDGPUMemoryUtils.h
Go to the documentation of this file.
1//===- AMDGPUMemoryUtils.h - Memory related helper functions -*- C++ -*----===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUMEMORYUTILS_H
10#define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUMEMORYUTILS_H
11
12#include <vector>
13
14namespace llvm {
15
16struct Align;
17class AAResults;
18class DataLayout;
19class Function;
20class GlobalVariable;
21class LoadInst;
22class MemoryDef;
23class MemorySSA;
24class Module;
25class Value;
26
27namespace AMDGPU {
28
29Align getAlign(DataLayout const &DL, const GlobalVariable *GV);
30
31bool isLDSVariableToLower(const GlobalVariable &GV);
32std::vector<GlobalVariable *> findLDSVariablesToLower(Module &M,
33 const Function *F);
34
35/// Given a \p Def clobbering a load from \p Ptr according to the MSSA check
36/// if this is actually a memory update or an artificial clobber to facilitate
37/// ordering constraints.
38bool isReallyAClobber(const Value *Ptr, MemoryDef *Def, AAResults *AA);
39
40/// Check is a \p Load is clobbered in its function.
41bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA,
42 AAResults *AA);
43
44} // end namespace AMDGPU
45
46} // end namespace llvm
47
48#endif // LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUMEMORYUTILS_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
uint64_t Align
early cse Early CSE w MemorySSA
Definition: EarlyCSE.cpp:1809
#define F(x, y, z)
Definition: MD5.cpp:55
Machine Check Debug Module
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
std::vector< GlobalVariable * > findLDSVariablesToLower(Module &M, const Function *F)
Align getAlign(DataLayout const &DL, const GlobalVariable *GV)
bool isReallyAClobber(const Value *Ptr, MemoryDef *Def, AAResults *AA)
Given a Def clobbering a load from Ptr according to the MSSA check if this is actually a memory updat...
bool isLDSVariableToLower(const GlobalVariable &GV)
bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA, AAResults *AA)
Check is a Load is clobbered in its function.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18