LLVM 19.0.0git
AMDGPUMCKernelDescriptor.h
Go to the documentation of this file.
1//===--- AMDGPUMCKernelDescriptor.h ---------------------------*- 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/// \file
10/// AMDHSA kernel descriptor MCExpr struct for use in MC layer. Uses
11/// AMDHSAKernelDescriptor.h for sizes and constants.
12///
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELDESCRIPTOR_H
17#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELDESCRIPTOR_H
18
20
21namespace llvm {
22class MCExpr;
23class MCContext;
24class MCSubtargetInfo;
25namespace AMDGPU {
26
30 const MCExpr *kernarg_size = nullptr;
31 const MCExpr *compute_pgm_rsrc3 = nullptr;
32 const MCExpr *compute_pgm_rsrc1 = nullptr;
33 const MCExpr *compute_pgm_rsrc2 = nullptr;
35 const MCExpr *kernarg_preload = nullptr;
36
39 // MCExpr for:
40 // Dst = Dst & ~Mask
41 // Dst = Dst | (Value << Shift)
42 static void bits_set(const MCExpr *&Dst, const MCExpr *Value, uint32_t Shift,
43 uint32_t Mask, MCContext &Ctx);
44
45 // MCExpr for:
46 // return (Src & Mask) >> Shift
47 static const MCExpr *bits_get(const MCExpr *Src, uint32_t Shift,
48 uint32_t Mask, MCContext &Ctx);
49};
50
51} // end namespace AMDGPU
52} // end namespace llvm
53
54#endif // LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELDESCRIPTOR_H
AMDHSA kernel descriptor definitions.
Context object for machine code objects.
Definition: MCContext.h:81
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
Generic base class for all target subtargets.
LLVM Value Representation.
Definition: Value.h:74
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
static const MCExpr * bits_get(const MCExpr *Src, uint32_t Shift, uint32_t Mask, MCContext &Ctx)
static void bits_set(const MCExpr *&Dst, const MCExpr *Value, uint32_t Shift, uint32_t Mask, MCContext &Ctx)
static MCKernelDescriptor getDefaultAmdhsaKernelDescriptor(const MCSubtargetInfo *STI, MCContext &Ctx)