LLVM
20.0.0git
lib
Target
AMDGPU
MCTargetDesc
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
19
#include "
llvm/Support/AMDHSAKernelDescriptor.h
"
20
21
namespace
llvm
{
22
class
MCExpr;
23
class
MCContext;
24
class
MCSubtargetInfo;
25
namespace
AMDGPU {
26
27
struct
MCKernelDescriptor
{
28
const
MCExpr
*
group_segment_fixed_size
=
nullptr
;
29
const
MCExpr
*
private_segment_fixed_size
=
nullptr
;
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
;
34
const
MCExpr
*
kernel_code_properties
=
nullptr
;
35
const
MCExpr
*
kernarg_preload
=
nullptr
;
36
37
static
MCKernelDescriptor
38
getDefaultAmdhsaKernelDescriptor
(
const
MCSubtargetInfo
*STI,
MCContext
&Ctx);
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
AMDHSAKernelDescriptor.h
AMDHSA kernel descriptor definitions.
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:83
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition:
MCExpr.h:34
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition:
MCSubtargetInfo.h:76
llvm::Value
LLVM Value Representation.
Definition:
Value.h:74
uint32_t
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::AMDGPU::MCKernelDescriptor
Definition:
AMDGPUMCKernelDescriptor.h:27
llvm::AMDGPU::MCKernelDescriptor::compute_pgm_rsrc2
const MCExpr * compute_pgm_rsrc2
Definition:
AMDGPUMCKernelDescriptor.h:33
llvm::AMDGPU::MCKernelDescriptor::kernarg_size
const MCExpr * kernarg_size
Definition:
AMDGPUMCKernelDescriptor.h:30
llvm::AMDGPU::MCKernelDescriptor::kernarg_preload
const MCExpr * kernarg_preload
Definition:
AMDGPUMCKernelDescriptor.h:35
llvm::AMDGPU::MCKernelDescriptor::compute_pgm_rsrc3
const MCExpr * compute_pgm_rsrc3
Definition:
AMDGPUMCKernelDescriptor.h:31
llvm::AMDGPU::MCKernelDescriptor::private_segment_fixed_size
const MCExpr * private_segment_fixed_size
Definition:
AMDGPUMCKernelDescriptor.h:29
llvm::AMDGPU::MCKernelDescriptor::bits_get
static const MCExpr * bits_get(const MCExpr *Src, uint32_t Shift, uint32_t Mask, MCContext &Ctx)
Definition:
AMDGPUMCKernelDescriptor.cpp:92
llvm::AMDGPU::MCKernelDescriptor::compute_pgm_rsrc1
const MCExpr * compute_pgm_rsrc1
Definition:
AMDGPUMCKernelDescriptor.h:32
llvm::AMDGPU::MCKernelDescriptor::bits_set
static void bits_set(const MCExpr *&Dst, const MCExpr *Value, uint32_t Shift, uint32_t Mask, MCContext &Ctx)
Definition:
AMDGPUMCKernelDescriptor.cpp:82
llvm::AMDGPU::MCKernelDescriptor::group_segment_fixed_size
const MCExpr * group_segment_fixed_size
Definition:
AMDGPUMCKernelDescriptor.h:28
llvm::AMDGPU::MCKernelDescriptor::getDefaultAmdhsaKernelDescriptor
static MCKernelDescriptor getDefaultAmdhsaKernelDescriptor(const MCSubtargetInfo *STI, MCContext &Ctx)
Definition:
AMDGPUMCKernelDescriptor.cpp:21
llvm::AMDGPU::MCKernelDescriptor::kernel_code_properties
const MCExpr * kernel_code_properties
Definition:
AMDGPUMCKernelDescriptor.h:34
Generated on Tue Dec 3 2024 15:49:12 for LLVM by
1.9.6