clang  19.0.0git
CGSYCLRuntime.h
Go to the documentation of this file.
1 //===----- CGSYCLRuntime.h - Interface to SYCL 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 custom clang code generation for SYCL.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_LIB_CODEGEN_CGSYCLRUNTIME_H
14 #define LLVM_CLANG_LIB_CODEGEN_CGSYCLRUNTIME_H
15 
16 #include "CodeGenFunction.h"
17 
18 #include "clang/AST/Decl.h"
19 #include "llvm/IR/Value.h"
20 
21 namespace clang {
22 namespace CodeGen {
23 
24 class CodeGenModule;
25 
26 // These aspects are internal and used for device image splitting purposes only.
27 // They are not exposed to the SYCL users through "aspect" enum. That's why
28 // they are intentionally assigned negative values to filter them out at the
29 // stage of embedding used aspects as device requirements to the executable.
30 // We don't pass these internal aspects to the SYCL RT.
31 enum SYCLInternalAspect : int32_t {
37 };
38 
40 protected:
42 
43 public:
45 
46  bool actOnFunctionStart(const FunctionDecl &FD, llvm::Function &F);
48  bool actOnAutoVarEmit(CodeGenFunction &CGF, const VarDecl &D,
49  llvm::Value *Addr);
51  llvm::Value *Addr);
52 };
53 
54 } // namespace CodeGen
55 } // namespace clang
56 
57 #endif // LLVM_CLANG_LIB_CODEGEN_CGSYCLRUNTIME_H
bool actOnFunctionStart(const FunctionDecl &FD, llvm::Function &F)
void emitWorkGroupLocalVarDecl(CodeGenFunction &CGF, const VarDecl &D)
bool actOnGlobalVarEmit(CodeGenModule &CGM, const VarDecl &D, llvm::Value *Addr)
CGSYCLRuntime(CodeGenModule &CGM)
Definition: CGSYCLRuntime.h:44
bool actOnAutoVarEmit(CodeGenFunction &CGF, const VarDecl &D, llvm::Value *Addr)
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
This class organizes the cross-function state that is used while generating LLVM code.
Represents a function declaration or definition.
Definition: Decl.h:1972
Represents a variable declaration or definition.
Definition: Decl.h:919
@ fp_intrinsic_accuracy_high
Definition: CGSYCLRuntime.h:32
@ fp_intrinsic_accuracy_medium
Definition: CGSYCLRuntime.h:33
@ fp_intrinsic_accuracy_cuda
Definition: CGSYCLRuntime.h:36
@ fp_intrinsic_accuracy_sycl
Definition: CGSYCLRuntime.h:35
The JSON file list parser is used to communicate input to InstallAPI.