15#ifndef LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
16#define LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
65 std::pair<unsigned, unsigned> PairVal =
81 LineIt(*Buf,
true,
'#') {
92 return "Basic Block Sections Profile Reader";
105 std::pair<bool, SmallVector<BBClusterInfo>>
118 auto R = FuncAliasMap.find(FuncName);
119 return R == FuncAliasMap.end() ? FuncName : R->second;
123 Error createProfileParseError(
Twine Message)
const {
124 return make_error<StringError>(
141 Error ReadV0Profile();
144 Error ReadV1Profile();
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 > > getClusterInfoForFunction(StringRef FuncName) const
SmallVector< SmallVector< unsigned > > getClonePathsForFunction(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.
Tagged union holding either a T or a Error.
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...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
A forward iterator which reads text lines from a buffer.
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...
void initializeBasicBlockSectionsProfileReaderPass(PassRegistry &)
ImmutablePass * createBasicBlockSectionsProfileReaderPass(const MemoryBuffer *Buf)
unsigned PositionInCluster
static bool isEqual(const UniqueBBID &LHS, const UniqueBBID &RHS)
static UniqueBBID getEmptyKey()
static unsigned getHashValue(const UniqueBBID &Val)
static UniqueBBID getTombstoneKey()
An information struct used to provide DenseMap with the various necessary components for a given valu...
SmallVector< BBClusterInfo > ClusterInfo
SmallVector< SmallVector< unsigned > > ClonePaths