clang
19.0.0git
|
#include "clang/Sema/SemaSYCL.h"
Public Types | |
enum | kernel_param_kind_t { kind_first , kind_accessor = kind_first , kind_std_layout , kind_sampler , kind_pointer , kind_specialization_constants_buffer , kind_stream , kind_last = kind_stream } |
Public Member Functions | |
SYCLIntegrationHeader (SemaSYCL &S) | |
void | emit (raw_ostream &Out) |
Emits contents of the header into given stream. More... | |
bool | emit (StringRef MainSrc) |
Emits contents of the header into a file with given name. More... | |
void | startKernel (const FunctionDecl *SyclKernel, QualType KernelNameType, SourceLocation Loc, bool IsESIMD, bool IsUnnamedKernel, int64_t ObjSize) |
Signals that subsequent parameter descriptor additions will go to the kernel with given name. More... | |
void | addParamDesc (kernel_param_kind_t Kind, int Info, unsigned Offset) |
Adds a kernel parameter descriptor to current kernel invocation descriptor. More... | |
void | endKernel () |
Signals that addition of parameter descriptors to current kernel invocation descriptor has finished. More... | |
void | addSpecConstant (StringRef IDName, QualType IDType) |
Registers a specialization constant to emit info for it into the header. More... | |
void | updateKernelNames (const FunctionDecl *SyclKernel, StringRef Name, StringRef StableName) |
Update the names of a kernel description based on its SyclKernel. More... | |
void | addDeviceGlobalRegistration () |
Signals that emission of __sycl_device_global_registration type and declaration of variable __sycl_device_global_registrar of this type in integration header is required. More... | |
void | addHostPipeRegistration () |
Signals that emission of __sycl_host_pipe_registration type and declaration of variable __sycl_host_pipe_registrar of this type in integration header is required. More... | |
Definition at line 49 of file SemaSYCL.h.
Enumerator | |
---|---|
kind_first | |
kind_accessor | |
kind_std_layout | |
kind_sampler | |
kind_pointer | |
kind_specialization_constants_buffer | |
kind_stream | |
kind_last |
Definition at line 53 of file SemaSYCL.h.
SYCLIntegrationHeader::SYCLIntegrationHeader | ( | SemaSYCL & | S | ) |
Definition at line 6233 of file SemaSYCL.cpp.
|
inline |
Signals that emission of __sycl_device_global_registration type and declaration of variable __sycl_device_global_registrar of this type in integration header is required.
Definition at line 105 of file SemaSYCL.h.
|
inline |
Signals that emission of __sycl_host_pipe_registration type and declaration of variable __sycl_host_pipe_registrar of this type in integration header is required.
Definition at line 112 of file SemaSYCL.h.
void SYCLIntegrationHeader::addParamDesc | ( | kernel_param_kind_t | Kind, |
int | Info, | ||
unsigned | Offset | ||
) |
Adds a kernel parameter descriptor to current kernel invocation descriptor.
Definition at line 6214 of file SemaSYCL.cpp.
References Offset.
void SYCLIntegrationHeader::addSpecConstant | ( | StringRef | IDName, |
QualType | IDType | ||
) |
Registers a specialization constant to emit info for it into the header.
Definition at line 6229 of file SemaSYCL.cpp.
void SYCLIntegrationHeader::emit | ( | raw_ostream & | Out | ) |
Emits contents of the header into given stream.
Definition at line 5931 of file SemaSYCL.cpp.
References clang::PrintingPolicy::AnonymousTagLocations, clang::LangOptionsBase::Disable, End, clang::LangOptionsBase::Force, clang::Sema::getASTContext(), clang::PresumedLoc::getColumn(), clang::CharSourceRange::getEnd(), clang::SourceManager::getExpansionRange(), clang::PresumedLoc::getFilename(), clang::TargetInfo::getInt64Type(), clang::Sema::getLangOpts(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::getSYCLVersionMacros(), clang::ASTContext::getTargetInfo(), OutputStableNameInChars(), P, paramKind2Str(), clang::TransferrableTargetInfo::SignedLong, clang::PrintingPolicy::SuppressTypedefs, clang::PrintingPolicy::SuppressUnwrittenScope, SYCLFwdDeclEmitter::Visit(), and SYCLKernelNameTypePrinter::Visit().
Referenced by clang::Sema::ActOnEndOfTranslationUnitFragment(), and emit().
bool SYCLIntegrationHeader::emit | ( | StringRef | MainSrc | ) |
Emits contents of the header into a file with given name.
Returns true/false on success/failure.
Definition at line 6189 of file SemaSYCL.cpp.
References emit().
void SYCLIntegrationHeader::endKernel | ( | ) |
Signals that addition of parameter descriptors to current kernel invocation descriptor has finished.
Definition at line 6225 of file SemaSYCL.cpp.
void SYCLIntegrationHeader::startKernel | ( | const FunctionDecl * | SyclKernel, |
QualType | KernelNameType, | ||
SourceLocation | Loc, | ||
bool | IsESIMD, | ||
bool | IsUnnamedKernel, | ||
int64_t | ObjSize | ||
) |
Signals that subsequent parameter descriptor additions will go to the kernel with given name.
Starts new kernel invocation descriptor.
Definition at line 6205 of file SemaSYCL.cpp.
|
inline |
Update the names of a kernel description based on its SyclKernel.
Definition at line 92 of file SemaSYCL.h.
Referenced by clang::SemaSYCL::SetSYCLKernelNames().