LLVM 24.0.0git
NVVMAttributes.h
Go to the documentation of this file.
1//===--- NVVMAttributes.h - NVVM IR attribute names -------------*- 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// Canonical string constants for NVVM function and parameter attributes.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_SUPPORT_NVVMATTRIBUTES_H
14#define LLVM_SUPPORT_NVVMATTRIBUTES_H
15
16#include "llvm/ADT/StringRef.h"
17
18namespace llvm {
19namespace NVVMAttr {
20
21constexpr StringLiteral MaxNTID("nvvm.maxntid");
22constexpr StringLiteral ReqNTID("nvvm.reqntid");
23constexpr StringLiteral ClusterDim("nvvm.cluster_dim");
24constexpr StringLiteral MaxClusterRank("nvvm.maxclusterrank");
25constexpr StringLiteral MinCTASm("nvvm.minctasm");
26constexpr StringLiteral MaxNReg("nvvm.maxnreg");
27constexpr StringLiteral BlocksAreClusters("nvvm.blocksareclusters");
28constexpr StringLiteral GridConstant("nvvm.grid_constant");
29
30// Custom ABI attributes: the number of registers a function preserves across a
31// call. Valid on function definitions and declarations, and on callsites for
32// indirect calls.
33// Ref:
34// https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#performance-tuning-directives-abi-preserve
35constexpr StringLiteral AbiPreserve("nvvm.abi_preserve");
36constexpr StringLiteral AbiPreserveControl("nvvm.abi_preserve_control");
37
38// All custom ABI attributes, in PTX emission order.
41
42} // namespace NVVMAttr
43} // namespace llvm
44
45#endif // LLVM_SUPPORT_NVVMATTRIBUTES_H
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition StringRef.h:888
constexpr StringLiteral AbiPreserveAttrs[]
constexpr StringLiteral GridConstant("nvvm.grid_constant")
constexpr StringLiteral MaxNTID("nvvm.maxntid")
constexpr StringLiteral AbiPreserveControl("nvvm.abi_preserve_control")
constexpr StringLiteral MaxNReg("nvvm.maxnreg")
constexpr StringLiteral MinCTASm("nvvm.minctasm")
constexpr StringLiteral ReqNTID("nvvm.reqntid")
constexpr StringLiteral MaxClusterRank("nvvm.maxclusterrank")
constexpr StringLiteral AbiPreserve("nvvm.abi_preserve")
constexpr StringLiteral ClusterDim("nvvm.cluster_dim")
constexpr StringLiteral BlocksAreClusters("nvvm.blocksareclusters")
This is an optimization pass for GlobalISel generic memory operations.