LLVM 19.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
12namespace llvm {
13
14struct Align;
15class AAResults;
16class DataLayout;
17class GlobalVariable;
18class LoadInst;
19class MemoryDef;
20class MemorySSA;
21class Value;
22
23namespace AMDGPU {
24
25Align getAlign(DataLayout const &DL, const GlobalVariable *GV);
26
27bool isDynamicLDS(const GlobalVariable &GV);
28bool isLDSVariableToLower(const GlobalVariable &GV);
29
30/// Given a \p Def clobbering a load from \p Ptr according to the MSSA check
31/// if this is actually a memory update or an artificial clobber to facilitate
32/// ordering constraints.
33bool isReallyAClobber(const Value *Ptr, MemoryDef *Def, AAResults *AA);
34
35/// Check is a \p Load is clobbered in its function.
36bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA,
37 AAResults *AA);
38
39} // end namespace AMDGPU
40
41} // end namespace llvm
42
43#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:1948
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