Lines Matching +full:gpu +full:- +full:id

1 //===--- NVPTX.cpp - Implement NVPTX target feature support ---------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
24 #define BUILTIN(ID, TYPE, ATTRS) \
25 {#ID, TYPE, ATTRS, nullptr, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
26 #define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) \
27 {#ID, TYPE, ATTRS, nullptr, HeaderDesc::HEADER, ALL_LANGUAGES},
28 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
29 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
40 "NVPTX only supports 32- and 64-bit modes.");
62 GPU = OffloadArch::UNUSED;
69 resetDataLayout("e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64");
72 "e-p3:32:32-p4:32:32-p5:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64");
74 resetDataLayout("e-i64:64-i128:128-v16:16-v32:32-n16:32:64");
106 PointerWidth = HostTarget->getPointerWidth(LangAS::Default);
107 PointerAlign = HostTarget->getPointerAlign(LangAS::Default);
108 BoolWidth = HostTarget->getBoolWidth();
109 BoolAlign = HostTarget->getBoolAlign();
110 IntWidth = HostTarget->getIntWidth();
111 IntAlign = HostTarget->getIntAlign();
112 HalfWidth = HostTarget->getHalfWidth();
113 HalfAlign = HostTarget->getHalfAlign();
114 FloatWidth = HostTarget->getFloatWidth();
115 FloatAlign = HostTarget->getFloatAlign();
116 DoubleWidth = HostTarget->getDoubleWidth();
117 DoubleAlign = HostTarget->getDoubleAlign();
118 LongWidth = HostTarget->getLongWidth();
119 LongAlign = HostTarget->getLongAlign();
120 LongLongWidth = HostTarget->getLongLongWidth();
121 LongLongAlign = HostTarget->getLongLongAlign();
122 MinGlobalAlign = HostTarget->getMinGlobalAlign(/* TypeSize = */ 0,
124 NewAlign = HostTarget->getNewAlign();
126 HostTarget->getDefaultAlignForAttributeAligned();
127 SizeType = HostTarget->getSizeType();
128 IntMaxType = HostTarget->getIntMaxType();
129 PtrDiffType = HostTarget->getPtrDiffType(LangAS::Default);
130 IntPtrType = HostTarget->getIntPtrType();
131 WCharType = HostTarget->getWCharType();
132 WIntType = HostTarget->getWIntType();
133 Char16Type = HostTarget->getChar16Type();
134 Char32Type = HostTarget->getChar32Type();
135 Int64Type = HostTarget->getInt64Type();
136 SigAtomicType = HostTarget->getSigAtomicType();
137 ProcessIDType = HostTarget->getProcessIDType();
139 UseBitFieldTypeAlignment = HostTarget->useBitFieldTypeAlignment();
140 UseZeroLengthBitfieldAlignment = HostTarget->useZeroLengthBitfieldAlignment();
141 UseExplicitBitFieldAlignment = HostTarget->useExplicitBitFieldAlignment();
142 ZeroLengthBitfieldBoundary = HostTarget->getZeroLengthBitfieldBoundary();
148 MaxAtomicInlineWidth = HostTarget->getMaxAtomicInlineWidth();
151 // - LargeArrayMinWidth, LargeArrayAlign: Not visible across the
153 // - SuitableAlign: Not visible across the host/device boundary, and may
156 // - LongDoubleWidth, LongDoubleAlign: nvptx's long double type is the same
178 if (GPU == OffloadArch::UNUSED && !HostTarget)
182 // Set __CUDA_ARCH__ for the GPU specified.
184 switch (GPU) {
240 assert(false && "No GPU arch when compiling CUDA device code.");
288 if (GPU == OffloadArch::SM_90a)
295 clang::NVPTX::LastTSBuiltin - Builtin::FirstTSBuiltin);