15#ifndef LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
16#define LLVM_CODEGEN_BASICBLOCKSECTIONSPROFILEREADER_H
68 std::pair<unsigned, unsigned> PairVal =
82 : MBuf(Buf), LineIt(*Buf,
true,
'#'){};
96 std::pair<bool, SmallVector<BBClusterInfo>>
105 auto R = FuncAliasMap.find(FuncName);
106 return R == FuncAliasMap.end() ? FuncName : R->second;
110 Error createProfileParseError(
Twine Message)
const {
111 return make_error<StringError>(
128 Error ReadV0Profile();
131 Error ReadV1Profile();
198 return "Basic Block Sections Profile Reader";
203 std::pair<bool, SmallVector<BBClusterInfo>>
This file defines the StringMap class.
Module.h This file contains the declarations for the Module class.
const char LLVMTargetMachineRef TM
This header defines various interfaces for pass management in LLVM.
This file defines the SmallString class.
This file defines the SmallVector class.
A container for analyses that lazily runs them and caches their results.
Analysis pass providing the BasicBlockSectionsProfileReader.
BasicBlockSectionsProfileReader Result
Result run(Function &F, FunctionAnalysisManager &AM)
BasicBlockSectionsProfileReaderAnalysis(const TargetMachine *TM)
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
BasicBlockSectionsProfileReader BBSPR
BasicBlockSectionsProfileReader & getBBSPR()
SmallVector< SmallVector< unsigned > > getClonePathsForFunction(StringRef FuncName) const
bool isFunctionHot(StringRef FuncName) const
BasicBlockSectionsProfileReaderWrapperPass()
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
std::pair< bool, SmallVector< BBClusterInfo > > getClusterInfoForFunction(StringRef FuncName) const
BasicBlockSectionsProfileReaderWrapperPass(const MemoryBuffer *Buf)
bool isFunctionHot(StringRef FuncName) const
std::pair< bool, SmallVector< BBClusterInfo > > getClusterInfoForFunction(StringRef FuncName) const
SmallVector< SmallVector< unsigned > > getClonePathsForFunction(StringRef FuncName) const
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.
Primary interface to the complete machine description for the target machine.
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 initializeBasicBlockSectionsProfileReaderWrapperPassPass(PassRegistry &)
ImmutablePass * createBasicBlockSectionsProfileReaderWrapperPass(const MemoryBuffer *Buf)
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
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