LLVM API Documentation

Public Member Functions | Static Public Member Functions
llvm::IndexedInstrProfReader Class Reference

Reader for the indexed binary instrprof format. More...

#include <InstrProfReader.h>

Inheritance diagram for llvm::IndexedInstrProfReader:
Inheritance graph
[legend]
Collaboration diagram for llvm::IndexedInstrProfReader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IndexedInstrProfReader (std::unique_ptr< MemoryBuffer > DataBuffer)
std::error_code readHeader () override
 Read the file header.
std::error_code readNextRecord (InstrProfRecord &Record) override
 Read a single record.
std::error_code getFunctionCounts (StringRef FuncName, uint64_t FuncHash, std::vector< uint64_t > &Counts)
 Fill Counts with the profile data for the given function name.
uint64_t getMaximumFunctionCount ()
 Return the maximum of all known function counts.

Static Public Member Functions

static bool hasFormat (const MemoryBuffer &DataBuffer)
 Return true if the given buffer is in an indexed instrprof format.
static std::error_code create (std::string Path, std::unique_ptr< IndexedInstrProfReader > &Result)
 Factory method to create an indexed reader.

Detailed Description

Reader for the indexed binary instrprof format.

Definition at line 262 of file InstrProfReader.h.


Constructor & Destructor Documentation

llvm::IndexedInstrProfReader::IndexedInstrProfReader ( std::unique_ptr< MemoryBuffer DataBuffer) [inline]

Definition at line 281 of file InstrProfReader.h.


Member Function Documentation

std::error_code IndexedInstrProfReader::create ( std::string  Path,
std::unique_ptr< IndexedInstrProfReader > &  Result 
) [static]

Factory method to create an indexed reader.

Definition at line 64 of file InstrProfReader.cpp.

References llvm::bad_magic, hasFormat(), initializeReader(), and setupMemoryBuffer().

std::error_code IndexedInstrProfReader::getFunctionCounts ( StringRef  FuncName,
uint64_t  FuncHash,
std::vector< uint64_t > &  Counts 
)

Return the maximum of all known function counts.

Definition at line 296 of file InstrProfReader.h.

Return true if the given buffer is in an indexed instrprof format.

Definition at line 289 of file InstrProfReader.cpp.

References llvm::MemoryBuffer::getBufferSize(), llvm::MemoryBuffer::getBufferStart(), and Magic.

Referenced by llvm::InstrProfReader::create(), and create().

std::error_code IndexedInstrProfReader::readHeader ( ) [override, virtual]
std::error_code IndexedInstrProfReader::readNextRecord ( InstrProfRecord Record) [override, virtual]

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