LLVM-BCANALYZER(1)
π NAME π
okay so, first things first bestie: this is the manual page for llvm-bcanalyzer, and it's part of the LLVM project. She's a LLVM bitcode analyzer, and yes she is That Girl π
β¨ SYNOPSIS β¨
llvm-bcanalyzer [options] [filename]
π¦ DESCRIPTION π¦
llvm-bcanalyzer is a small little utility for analyzing bitcode files, and honestly? She's lowkey iconic. π«Ά
She reads a bitcode file (like the ones llvm-as makes) and produces a statistical report on what's inside it. She can also dump a low-level but human-readable version of the bitcode file. So it's giving inspector energy, it's giving detective vibes, fr fr.
Real talk though: this tool is probably not of much interest or utility unless you're literally working directly with the bitcode file format. Most LLVM users can just ignore this tool. No cap. Not everything is for everybody and that's fine, bestie. π
Now, if filename is omitted, or if it's literally just -, then llvm-bcanalyzer reads its input from standard input. Which is super useful for combining the tool into a pipeline β she plays well with others, main character energy for sure. Output goes to the standard output. β¨
π OPTIONS π
--dumpβ tellsllvm-bcanalyzerto dump the bitcode in a human-readable format. Heads up though, this format is significantly different from LLVM assembly, and it spills all the details about the encoding of the bitcode file. It's the gossip column of formats, iykyk. π--helpβ prints a summary of the command line options. She's helpful, she's polite, she's everything. π
πͺ EXIT STATUS πͺ
If llvm-bcanalyzer succeeds, she exits with 0 β slay, we love a happy ending. π
Otherwise, if an error occurs, she exits with a non-zero value, usually 1. Not her fault, bestie, the vibes were simply off. π
πΈ SUMMARY OUTPUT DEFINITIONS πΈ
These following items are always printed by llvm-bcanalyzer. They comprize the summary output β the whole little report card. Let's go through them one by one, no skipping, because we do NOT leave details behind in this house. π
- Bitcode Analysis Of Module β this just provides the name of the module for which bitcode analysis is being generated. Like a little name tag at a party. π·οΈ
- Bitcode Version Number β the bitcode version (not the LLVM version, okay, not the LLVM version) of the file read by the analyzer.
- File Size β the size, in bytes, of the entire bitcode file.
- Module Bytes β the size, in bytes, of the module block. The percentage is relative to File Size.
- Function Bytes β the size, in bytes, of all the function blocks. The percentage is relative to File Size.
- Global Types Bytes β the size, in bytes, of the Global Types Pool. The percentage is relative to File Size. This is the size of the definitions of all types in the bitcode file.
- Constant Pool Bytes β the size, in bytes, of the Constant Pool Blocks. The percentage is relative to File Size.
- Module Globals Bytes β ths size, in bytes, of the Global Variable Definitions and their initializers. The percentage is relative to File Size.
- Instruction List Bytes β the size, in bytes, of all the instruction lists in all the functions. The percentage is relative to File Size. π Note that this value is also included in the Function Bytes.
- Compaction Table Bytes β the size, in bytes, of all the compaction tables in all the functions. The percentage is relative to File Size. π Note that this value is also included in the Function Bytes.
- Symbol Table Bytes β the size, in bytes, of all the symbol tables in all the functions. The percentage is relative to File Size. π Note that this value is also included in the Function Bytes.
- Dependent Libraries Bytes β the size, in bytes, of the list of dependent libraries in the module. The percentage is relative to File Size. π Note that this value is also included in the Module Global Bytes.
- Number Of Bitcode Blocks β the total number of blocks of any kind in the bitcode file.
- Number Of Functions β the total number of function definitions in the bitcode file.
- Number Of Types β the total number of types defined in the Global Types Pool.
- Number Of Constants β the total number of constants (of any type) defined in the Constant Pool.
- Number Of Basic Blocks β the total number of basic blocks defined in all functions in the bitcode file.
- Number Of Instructions β the total number of instructions defined in all functions in the bitcode file.
- Number Of Long Instructions β the total number of long instructions defined in all functions in the bitcode file. Long instructions are those taking greater than
4bytes. Typically long instructions areGetElementPtrwith several indices, PHI nodes, and calls to functions with large numbers of arguments. They're the big ones, the units, the "hold my drink" instructions. πͺ - Number Of Operands β the total number of operands used in all instructions in the bitcode file.
- Number Of Compaction Tables β the total number of compaction tables in all functions in the bitcode file.
- Number Of Symbol Tables β the total number of symbol tables in all functions in the bitcode file.
- Number Of Dependent Libs β the total number of dependent libraries found in the bitcode file.
- Total Instruction Size β the total size of the instructions in all functions in the bitcode file.
- Average Instruction Size β the average number of bytes per instruction across all functions in the bitcode file. This value is computed by dividing Total Instruction Size by Number Of Instructions.
- Maximum Type Slot Number β the maximum value used for a type's slot number. Larger slot number values take more bytes to encode. Bigger number, bigger encoding, that's just how it is. π
- Maximum Value Slot Number β the maximum value used for a value's slot number. Larger slot number values take more bytes to encode. Same deal, bestie.
- Bytes Per Value β the average size of a
Valuedefinition (of any type). This is computed by dividing File Size by the total number of values of any type. - Bytes Per Global β the average size of a global definition (constants and global variables).
- Bytes Per Function β the average number of bytes per function definition. This is computed by dividing Function Bytes by Number Of Functions.
- # of VBR 32-bit Integers β the total number of 32-bit integers encoded using the Variable Bit Rate encoding scheme.
- # of VBR 64-bit Integers β the total number of 64-bit integers encoded using the Variable Bit Rate encoding scheme.
- # of VBR Compressed Bytes β the total number of bytes consumed by the 32-bit and 64-bit integers that use the Variable Bit Rate encoding scheme.
- # of VBR Expanded Bytes β the total number of bytes that would have been consumed by the 32-bit and 64-bit integers had they not been compressed with the Variable Bit Rage encoding scheme. (Variable Bit Rage, exactly as it's written. She's passionate. π€)
- Bytes Saved With VBR β the total number of bytes saved by using the Variable Bit Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes. We love a savings arc. π
π₯ DETAILED OUTPUT DEFINITIONS π₯
okay so these following definitions occur only if the -nodetails option was not given. The detailed output provides additional information on a per-function basis. It's the director's cut, the extended edition, the bonus content. π
- Type β the type signature of the function.
- Byte Size β the total number of bytes in the function's block.
- Basic Blocks β the number of basic blocks defined by the function.
- Instructions β the number of instructions defined by the function.
- Long Instructions β the number of instructions using the long instruction format in the function.
- Operands β the number of operands used by all instructions in the function.
- Instruction Size β the number of bytes consumed by instructions in the function.
- Average Instruction Size β the average number of bytes consumed by the instructions in the function. This value is computed by dividing Instruction Size by Instructions.
- Bytes Per Instruction β the average number of bytes used by the function per instruction. This value is computed by dividing Byte Size by Instructions. π Note that this is not the same as Average Instruction Size. It computes a number relative to the total function size, not just the size of the instruction list. Do not confuse them, bestie, they are sisters not twins. π
- Number of VBR 32-bit Integers β the total number of 32-bit integers found in this function (for any use).
- Number of VBR 64-bit Integers β the total number of 64-bit integers found in this function (for any use).
- Number of VBR Compressed Bytes β the total number of bytes in this function consumed by the 32-bit and 64-bit integers that use the Variable Bit Rate encoding scheme.
- Number of VBR Expanded Bytes β the total number of bytes in this function that would have been consumed by the 32-bit and 64-bit integers had they not been compressed with the Variable Bit Rate encoding scheme.
- Bytes Saved With VBR β the total number of bytes saved in this function by using the Variable Bit Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.
π«Ά SEE ALSO π«Ά
llvm-dis(1)<llvm-dis.html>- LLVM Bitcode File Format <>
π Author π
Maintained by the LLVM Team (https://llvm.org/). They're the parents, they're keeping the whole thing alive, respect. π«‘
π Copyright π
2003-2026, LLVM Project
and that's the whole page, bestie, you ate it up π β¨
this little legend came straight from the LLVM source, version 22, dated 2026-07-16 β mwah, go forth and analyze some bitcode, you got this ππ¦π
π¦ where this page comes from
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms