LLVM 22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::IndexedCodeGenDataReader Class Reference

#include "llvm/CGData/CodeGenDataReader.h"

Inheritance diagram for llvm::IndexedCodeGenDataReader:
[フレーム]
[legend]

Public Member Functions

  IndexedCodeGenDataReader (std::unique_ptr< MemoryBuffer > DataBuffer)
Error  read () override
  Read the contents including the header.
uint32_t  getVersion () const override
  Return the codegen data version.
  Return the codegen data kind.
  Return true if the header indicates the data has an outlined hash tree.
  Return true if the header indicates the data has a stable function map.
Public Member Functions inherited from llvm::CodeGenDataReader
  CodeGenDataReader ()=default
virtual  ~CodeGenDataReader ()=default
std::unique_ptr< OutlinedHashTreereleaseOutlinedHashTree ()
  Return the outlined hash tree that is released from the reader.

Static Public Member Functions

static bool  hasFormat (const MemoryBuffer &Buffer)
  Return true if the given buffer is in binary codegen data format.
Static Public Member Functions inherited from llvm::CodeGenDataReader
static LLVM_ABI Expected< std::unique_ptr< CodeGenDataReader > >  create (const Twine &Path, vfs::FileSystem &FS)
  Factory method to create an appropriately typed reader for the given codegen data file path and file system.
static LLVM_ABI Expected< std::unique_ptr< CodeGenDataReader > >  create (std::unique_ptr< MemoryBuffer > Buffer)
  Factory method to create an appropriately typed reader for the given memory buffer.
static LLVM_ABI Error  mergeFromObjectFile (const object::ObjectFile *Obj, OutlinedHashTreeRecord &GlobalOutlineRecord, StableFunctionMapRecord &GlobalFunctionMapRecord, stable_hash *CombinedHash=nullptr)
  Extract the cgdata embedded in sections from the given object file and merge them into the GlobalOutlineRecord.

Additional Inherited Members

Protected Member Functions inherited from llvm::CodeGenDataReader
Error  error (cgdata_error Err, const std::string &ErrMsg="")
  Set the current error and return same.
  Clear the current error and return a successful one.
Protected Attributes inherited from llvm::CodeGenDataReader
  The outlined hash tree that has been read.
  The stable function map that has been read. When it's released by.

Detailed Description

Definition at line 102 of file CodeGenDataReader.h.

Constructor & Destructor Documentation

◆  IndexedCodeGenDataReader() [1/2]

llvm::IndexedCodeGenDataReader::IndexedCodeGenDataReader ( std::unique_ptr< MemoryBuffer > DataBuffer )
inline

Definition at line 109 of file CodeGenDataReader.h.

References llvm::move().

Referenced by IndexedCodeGenDataReader(), and operator=().

◆  IndexedCodeGenDataReader() [2/2]

llvm::IndexedCodeGenDataReader::IndexedCodeGenDataReader ( const IndexedCodeGenDataReader & )
delete

References IndexedCodeGenDataReader().

Member Function Documentation

◆  getDataKind()

CGDataKind llvm::IndexedCodeGenDataReader::getDataKind ( ) const
inlineoverridevirtual

Return the codegen data kind.

Implements llvm::CodeGenDataReader.

Definition at line 122 of file CodeGenDataReader.h.

◆  getVersion()

uint32_t llvm::IndexedCodeGenDataReader::getVersion ( ) const
inlineoverridevirtual

Return the codegen data version.

Implements llvm::CodeGenDataReader.

Definition at line 120 of file CodeGenDataReader.h.

◆  hasFormat()

bool llvm::IndexedCodeGenDataReader::hasFormat ( const MemoryBuffer & Buffer )
static

Return true if the given buffer is in binary codegen data format.

Definition at line 167 of file CodeGenDataReader.cpp.

References llvm::little, llvm::IndexedCGData::Magic, and llvm::support::endian::read().

Referenced by llvm::CodeGenDataReader::create(), and operator=().

◆  hasOutlinedHashTree()

bool llvm::IndexedCodeGenDataReader::hasOutlinedHashTree ( ) const
inlineoverridevirtual

Return true if the header indicates the data has an outlined hash tree.

This does not mean that the data is still available.

Implements llvm::CodeGenDataReader.

Definition at line 127 of file CodeGenDataReader.h.

References llvm::FunctionOutlinedHashTree.

Referenced by read().

◆  hasStableFunctionMap()

bool llvm::IndexedCodeGenDataReader::hasStableFunctionMap ( ) const
inlineoverridevirtual

Return true if the header indicates the data has a stable function map.

Implements llvm::CodeGenDataReader.

Definition at line 132 of file CodeGenDataReader.h.

References llvm::StableFunctionMergingMap.

Referenced by read().

◆  operator=()

IndexedCodeGenDataReader & llvm::IndexedCodeGenDataReader::operator= ( const IndexedCodeGenDataReader & )
delete

References hasFormat(), IndexedCodeGenDataReader(), and read().

◆  read()

Error llvm::IndexedCodeGenDataReader::read ( )
overridevirtual

Read the contents including the header.

Implements llvm::CodeGenDataReader.

Definition at line 96 of file CodeGenDataReader.cpp.

References llvm::bad_header, llvm::eof, error, llvm::CodeGenDataReader::FunctionMapRecord, llvm::CodeGenDataReader::HashTreeRecord, hasOutlinedHashTree(), hasStableFunctionMap(), llvm::IndexedCodeGenDataLazyLoading, IndexedCodeGenDataReadFunctionMapNames, Ptr, llvm::IndexedCGData::Header::readFromBuffer(), and llvm::CodeGenDataReader::success().

Referenced by operator=().


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

Generated on for LLVM by doxygen 1.14.0

AltStyle によって変換されたページ (->オリジナル) /