clang 20.0.0git
Public Member Functions | Protected Attributes | List of all members
clang::IncrementalCUDADeviceParser Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Interpreter/DeviceOffload.h"

Inheritance diagram for clang::IncrementalCUDADeviceParser:
Inheritance graph
[legend]

Public Member Functions

 IncrementalCUDADeviceParser (Interpreter &Interp, std::unique_ptr< CompilerInstance > Instance, IncrementalParser &HostParser, llvm::LLVMContext &LLVMCtx, llvm::IntrusiveRefCntPtr< llvm::vfs::InMemoryFileSystem > VFS, llvm::Error &Err)
 
llvm::Expected< PartialTranslationUnit & > Parse (llvm::StringRef Input) override
 Parses incremental input by creating an in-memory file.
 
llvm::Expected< llvm::StringRef > GeneratePTX ()
 
llvm::Error GenerateFatbinary ()
 
 ~IncrementalCUDADeviceParser ()
 
- Public Member Functions inherited from clang::IncrementalParser
 IncrementalParser (Interpreter &Interp, std::unique_ptr< CompilerInstance > Instance, llvm::LLVMContext &LLVMCtx, llvm::Error &Err)
 
virtual ~IncrementalParser ()
 
CompilerInstancegetCI ()
 
CodeGeneratorgetCodeGen () const
 
virtual llvm::Expected< PartialTranslationUnit & > Parse (llvm::StringRef Input)
 Parses incremental input by creating an in-memory file.
 
llvm::StringRef GetMangledName (GlobalDecl GD) const
 Uses the CodeGenModule mangled name cache and avoids recomputing.
 
void CleanUpPTU (PartialTranslationUnit &PTU)
 
std::list< PartialTranslationUnit > & getPTUs ()
 
std::unique_ptr< llvm::Module > GenModule ()
 

Protected Attributes

IncrementalParserHostParser
 
int SMVersion
 
llvm::SmallString< 1024 > PTXCode
 
llvm::SmallVector< char, 1024 > FatbinContent
 
llvm::IntrusiveRefCntPtr< llvm::vfs::InMemoryFileSystem > VFS
 
- Protected Attributes inherited from clang::IncrementalParser
std::unique_ptr< IncrementalActionAct
 Long-lived, incremental parsing action.
 
std::unique_ptr< CompilerInstanceCI
 Compiler instance performing the incremental compilation.
 
std::unique_ptr< ParserP
 Parser.
 
ASTConsumerConsumer = nullptr
 Consumer to process the produced top level decls. Owned by Act.
 
unsigned InputCount = 0
 Counts the number of direct user input lines that have been parsed.
 
std::list< PartialTranslationUnitPTUs
 List containing every information about every incrementally parsed piece of code.
 
std::unique_ptr< llvm::Module > CachedInCodeGenModule
 When CodeGen is created the first llvm::Module gets cached in many places and we must keep it alive.
 

Additional Inherited Members

- Protected Member Functions inherited from clang::IncrementalParser
 IncrementalParser ()
 

Detailed Description

Definition at line 22 of file DeviceOffload.h.

Constructor & Destructor Documentation

◆ IncrementalCUDADeviceParser()

clang::IncrementalCUDADeviceParser::IncrementalCUDADeviceParser ( Interpreter Interp,
std::unique_ptr< CompilerInstance Instance,
IncrementalParser HostParser,
llvm::LLVMContext &  LLVMCtx,
llvm::IntrusiveRefCntPtr< llvm::vfs::InMemoryFileSystem >  VFS,
llvm::Error &  Err 
)

Definition at line 26 of file DeviceOffload.cpp.

References clang::IncrementalParser::CI, and SMVersion.

◆ ~IncrementalCUDADeviceParser()

clang::IncrementalCUDADeviceParser::~IncrementalCUDADeviceParser ( )

Definition at line 175 of file DeviceOffload.cpp.

Member Function Documentation

◆ GenerateFatbinary()

llvm::Error clang::IncrementalCUDADeviceParser::GenerateFatbinary ( )

Definition at line 108 of file DeviceOffload.cpp.

References FatbinContent, Kind, PTXCode, and SMVersion.

Referenced by Parse().

◆ GeneratePTX()

llvm::Expected< llvm::StringRef > clang::IncrementalCUDADeviceParser::GeneratePTX ( )

Definition at line 72 of file DeviceOffload.cpp.

References clang::IncrementalParser::getCI(), clang::IncrementalParser::PTUs, and PTXCode.

Referenced by Parse().

◆ Parse()

llvm::Expected< PartialTranslationUnit & > clang::IncrementalCUDADeviceParser::Parse ( llvm::StringRef  Input)
overridevirtual

Parses incremental input by creating an in-memory file.

Returns
a PartialTranslationUnit which holds information about the TranslationUnitDecl and llvm::Module corresponding to the input.

Reimplemented from clang::IncrementalParser.

Definition at line 45 of file DeviceOffload.cpp.

References clang::CodeGenOptions::CudaGpuBinaryFileName, FatbinContent, GenerateFatbinary(), GeneratePTX(), clang::IncrementalParser::getCI(), clang::CompilerInstance::getCodeGenOpts(), HostParser, clang::IncrementalParser::Parse(), clang::IncrementalParser::PTUs, and VFS.

Member Data Documentation

◆ FatbinContent

llvm::SmallVector<char, 1024> clang::IncrementalCUDADeviceParser::FatbinContent
protected

Definition at line 45 of file DeviceOffload.h.

Referenced by GenerateFatbinary(), and Parse().

◆ HostParser

IncrementalParser& clang::IncrementalCUDADeviceParser::HostParser
protected

Definition at line 42 of file DeviceOffload.h.

Referenced by Parse().

◆ PTXCode

llvm::SmallString<1024> clang::IncrementalCUDADeviceParser::PTXCode
protected

Definition at line 44 of file DeviceOffload.h.

Referenced by GenerateFatbinary(), and GeneratePTX().

◆ SMVersion

int clang::IncrementalCUDADeviceParser::SMVersion
protected

Definition at line 43 of file DeviceOffload.h.

Referenced by GenerateFatbinary(), and IncrementalCUDADeviceParser().

◆ VFS

llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> clang::IncrementalCUDADeviceParser::VFS
protected

Definition at line 46 of file DeviceOffload.h.

Referenced by Parse().


The documentation for this class was generated from the following files: