clang 23.0.0git
CIRGenCUDARuntime.h
Go to the documentation of this file.
1//===------ CIRGenCUDARuntime.h - Interface to CUDA Runtimes -----*- 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// This provides an abstract class for CUDA code generation. Concrete
10// subclasses of this implement code generation for specific CUDA
11// runtime libraries.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_LIB_CIR_CIRGENCUDARUNTIME_H
16#define LLVM_CLANG_LIB_CIR_CIRGENCUDARUNTIME_H
17
19
20namespace clang {
22}
23
24namespace clang::CIRGen {
25
26class CIRGenFunction;
27class CIRGenModule;
28class FunctionArgList;
29class RValue;
30class ReturnValueSlot;
31
33protected:
35
36public:
38 virtual ~CIRGenCUDARuntime();
39
40 virtual void emitDeviceStub(CIRGenFunction &cgf, cir::FuncOp fn,
41 FunctionArgList &args) = 0;
42
45 ReturnValueSlot retValue);
46
47 virtual mlir::Operation *getKernelHandle(cir::FuncOp fn, GlobalDecl gd) = 0;
48
49 virtual mlir::Operation *getKernelStub(mlir::Operation *handle) = 0;
50};
51
53
54} // namespace clang::CIRGen
55
56#endif // LLVM_CLANG_LIB_CIR_CIRGENCUDARUNTIME_H
virtual mlir::Operation * getKernelStub(mlir::Operation *handle)=0
virtual mlir::Operation * getKernelHandle(cir::FuncOp fn, GlobalDecl gd)=0
virtual void emitDeviceStub(CIRGenFunction &cgf, cir::FuncOp fn, FunctionArgList &args)=0
virtual RValue emitCUDAKernelCallExpr(CIRGenFunction &cgf, const CUDAKernelCallExpr *expr, ReturnValueSlot retValue)
This class organizes the cross-function state that is used while generating CIR code.
Type for representing both the decl and type of parameters to a function.
Definition CIRGenCall.h:193
This trivial value class is used to represent the result of an expression that is evaluated.
Definition CIRGenValue.h:33
Contains the address where the return value of a function can be stored, and whether the address is v...
Definition CIRGenCall.h:256
Represents a call to a CUDA kernel function.
Definition ExprCXX.h:235
GlobalDecl - represents a global declaration.
Definition GlobalDecl.h:57
CIRGenCUDARuntime * createNVCUDARuntime(CIRGenModule &cgm)
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
The JSON file list parser is used to communicate input to InstallAPI.