Go to the documentation of this file.
13 #ifndef LLVM_BITCODE_BITCODEANALYZER_H
14 #define LLVM_BITCODE_BITCODEANALYZER_H
57 unsigned NumTopBlocks = 0;
59 struct PerRecordStats {
60 unsigned NumInstances;
63 PerRecordStats() : NumInstances(0), NumAbbrev(0), TotalBits(0) {}
66 struct PerBlockIDStats {
68 unsigned NumInstances;
72 unsigned NumSubBlocks;
77 unsigned NumRecords, NumAbbreviatedRecords;
79 std::vector<PerRecordStats> CodeFreq;
81 : NumInstances(0), NumBits(0), NumSubBlocks(0), NumAbbrevs(0),
82 NumRecords(0), NumAbbreviatedRecords(0) {}
85 std::map<unsigned, PerBlockIDStats> BlockIDStats;
97 Error parseBlock(
unsigned BlockID,
unsigned IndentLevel,
107 #endif // LLVM_BITCODE_BITCODEANALYZER_H
BitcodeAnalyzer(StringRef Buffer, Optional< StringRef > BlockInfoBuffer=None)
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & OS
The stream.
This class maintains the abbreviations read from a block info block.
BCDumpOptions(raw_ostream &OS)
@ ClangSerializedDiagnosticsBitstream
This represents a position within a bitcode file, implemented on top of a SimpleBitstreamCursor.
bool Histogram
Print per-code histogram.
This class implements an extremely fast bulk output stream that can only output to a stream.
bool ShowBinaryBlobs
Print binary blobs using hex escapes.
bool DumpBlockinfo
Print BLOCKINFO block details.
@ ClangSerializedASTBitstream
Error analyze(Optional< BCDumpOptions > O=None, Optional< StringRef > CheckHash=None)
Analyze the bitcode file.
StringRef - Represent a constant reference to a string, i.e.
Lightweight error class with error context and mandatory checking.
CurStreamTypeType
CurStreamTypeType - A type for CurStreamType.
bool Symbolic
Don't emit numeric info in dump if symbolic info is available.
void printStats(BCDumpOptions O, Optional< StringRef > Filename=None)
Print stats about the bitcode file.