clang 20.0.0git
SemaNVPTX.cpp
Go to the documentation of this file.
1//===------ SemaNVPTX.cpp ------- NVPTX target-specific routines ----------===//
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// This file implements semantic analysis functions specific to NVPTX.
10//
11//===----------------------------------------------------------------------===//
12
15#include "clang/Sema/Sema.h"
16
17namespace clang {
18
20
22 unsigned BuiltinID,
23 CallExpr *TheCall) {
24 switch (BuiltinID) {
25 case NVPTX::BI__nvvm_cp_async_ca_shared_global_4:
26 case NVPTX::BI__nvvm_cp_async_ca_shared_global_8:
27 case NVPTX::BI__nvvm_cp_async_ca_shared_global_16:
28 case NVPTX::BI__nvvm_cp_async_cg_shared_global_16:
29 return SemaRef.checkArgCountAtMost(TheCall, 3);
30 }
31
32 return false;
33}
34
35} // namespace clang
This file declares semantic analysis functions specific to NVPTX.
Enumerates target-specific builtins in their own namespaces within namespace clang.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2830
Sema & SemaRef
Definition: SemaBase.h:40
bool CheckNVPTXBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
Definition: SemaNVPTX.cpp:21
SemaNVPTX(Sema &S)
Definition: SemaNVPTX.cpp:19
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:493
bool checkArgCountAtMost(CallExpr *Call, unsigned MaxArgCount)
Checks that a call expression's argument count is at most the desired number.
Exposes information about the current target.
Definition: TargetInfo.h:218
The JSON file list parser is used to communicate input to InstallAPI.