LLVM 19.0.0git
AMDKernelCodeTUtils.h
Go to the documentation of this file.
1//===- AMDGPUKernelCodeTUtils.h - helpers for amd_kernel_code_t -*- 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 AMDKernelCodeTUtils.h
10/// MC layer struct for AMDGPUMCKernelCodeT, provides MCExpr functionality where
11/// required.
12///
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
17#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
18
19#include "AMDKernelCodeT.h"
20#include "llvm/ADT/ArrayRef.h"
21#include "llvm/ADT/StringRef.h"
22
23namespace llvm {
24class MCAsmParser;
25class MCContext;
26class MCExpr;
27class MCStreamer;
28class MCSubtargetInfo;
29class raw_ostream;
30namespace AMDGPU {
31
34
35 // Names of most (if not all) members should match the ones used for table
36 // driven (array) generation in AMDKernelCodeTInfo.h.
62 uint8_t wavefront_size = 0;
63 int32_t call_convention = 0;
64 uint8_t reserved3[12] = {0};
67
70
71 const MCExpr *is_dynamic_callstack = nullptr;
72 const MCExpr *wavefront_sgpr_count = nullptr;
73 const MCExpr *workitem_vgpr_count = nullptr;
75
76 void initDefault(const MCSubtargetInfo *STI, MCContext &Ctx,
77 bool InitMCExpr = true);
78 void validate(const MCSubtargetInfo *STI, MCContext &Ctx);
79
80 const MCExpr *&getMCExprForIndex(int Index);
81
85};
86
87} // end namespace AMDGPU
88} // end namespace llvm
89
90#endif // LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCKERNELCODET_H
raw_pwrite_stream & OS
Generic assembler parser interface, for use by target specific assembly parsers.
Definition: MCAsmParser.h:123
Context object for machine code objects.
Definition: MCContext.h:83
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
Streaming machine code generation interface.
Definition: MCStreamer.h:213
Generic base class for all target subtargets.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void validate(const MCSubtargetInfo *STI, MCContext &Ctx)
void initDefault(const MCSubtargetInfo *STI, MCContext &Ctx, bool InitMCExpr=true)
void EmitKernelCodeT(raw_ostream &OS, MCContext &Ctx)
bool ParseKernelCodeT(StringRef ID, MCAsmParser &MCParser, raw_ostream &Err)
const MCExpr *& getMCExprForIndex(int Index)