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 isDynamicLDS(const GlobalVariable &GV);
32bool isLDSVariableToLower(const GlobalVariable &GV);
33
34/// Given a \p Def clobbering a load from \p Ptr according to the MSSA check
35/// if this is actually a memory update or an artificial clobber to facilitate
36/// ordering constraints.
37bool isReallyAClobber(const Value *Ptr, MemoryDef *Def, AAResults *AA);
38
39/// Check is a \p Load is clobbered in its function.
40bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA,
41 AAResults *AA);
42
43} // end namespace AMDGPU
44
45} // end namespace llvm
46
47#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:1831
Machine Check Debug Module
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
bool isDynamicLDS(const GlobalVariable &GV)
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