15#ifndef LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
16#define LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
49 LineIt(*Buf,
true,
'#') {
60 return "Basic Block Sections Profile Reader";
73 std::pair<bool, SmallVector<BBClusterInfo>>
82 auto R = FuncAliasMap.find(FuncName);
83 return R == FuncAliasMap.end() ? FuncName : R->second;
87 Error createProfileParseError(
Twine Message)
const {
88 return make_error<StringError>(
99 Error ReadV0Profile();
102 Error ReadV1Profile();
105 const MemoryBuffer *MBuf =
nullptr;
108 line_iterator LineIt;
112 StringMap<SmallString<128>> FunctionNameToDIFilename;
124 StringMap<StringRef> FuncAliasMap;
This file defines the StringMap class.
Module.h This file contains the declarations for the Module class.
This file defines the SmallString class.
This file defines the SmallVector class.
bool isFunctionHot(StringRef FuncName) const
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
std::pair< bool, SmallVector< BBClusterInfo > > getBBClusterInfoForFunction(StringRef FuncName) const
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
BasicBlockSectionsProfileReader(const MemoryBuffer *Buf)
BasicBlockSectionsProfileReader()
Lightweight error class with error context and mandatory checking.
ImmutablePass class - This class is used to provide information that does not need to be run.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
virtual StringRef getBufferIdentifier() const
Return an identifier for this buffer, typically the filename it was read from.
A Module instance is used to store all the information related to an LLVM module.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
int64_t line_number() const
Return the current line number. May return any number at EOF.
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
StringMap< SmallVector< BBClusterInfo > > ProgramBBClusterInfoMapTy
void initializeBasicBlockSectionsProfileReaderPass(PassRegistry &)
ImmutablePass * createBasicBlockSectionsProfileReaderPass(const MemoryBuffer *Buf)
unsigned PositionInCluster