LLVM-BCANALYZER(1)

๐Ÿ’– NAME ๐Ÿ’–

llvm-bcanalyzer โ€” LLVM bitcode analyzer ๐Ÿ’…โœจ (yes bestie, this is LLVM-BCANALYZER(1) โ€” she's lowkey minimal in the name department ๐ŸŽ€).


๐Ÿ“œ SYNOPSIS ๐Ÿ“œ


---

# ๐ŸŒธ DESCRIPTION ๐ŸŒธ

The `llvm-bcanalyzer` command is a small utility for analyzing bitcode files. She reads a bitcode file (such as generated with the `llvm-as` tool) and produces a statistical report on the contents of the bitcode file. She can also dump a low level but human-readable version of the bitcode file. ๐Ÿฆ‹

> ngl, this tool is probably not of much interest or utility except for those working directly with the bitcode file format. Most LLVM users can just ignore this tool. fr fr ๐Ÿ˜ญ

If *filename* is omitted or is `-`, then `llvm-bcanalyzer` reads its input from standard input. This is useful for combining the tool into a pipeline. Output is written to the standard output. โœจ

---

# โœจ OPTIONS โœจ

- **`--dump`** โ€” causes `llvm-bcanalyzer` to dump the bitcode in a human-readable format. This format is <hotpink>significantly different from LLVM assembly</hotpink> and provides details about the encoding of the bitcode file. ๐Ÿซถ
- **`--help`** โ€” print a summary of command line options. ๐ŸŽ€

---

# ๐Ÿ’€ EXIT STATUS ๐Ÿ’€

If `llvm-bcanalyzer` succeeds, she will exit with `0`. Otherwise, if an error occurs, she will exit with a non-zero value, usually `1`. No cap. ๐Ÿ’…

---

# ๐Ÿ” SUMMARY OUTPUT DEFINITIONS ๐Ÿ”

okay bestie, the following items are <purple>always printed</purple> by `llvm-bcanalyzer`. They make up the summary output. It's giving very detailed, and we love that for her ๐Ÿ’–:

- **`Bitcode Analysis Of Module`** โ€” this is literally just the name of the module she's analyzing for you. ๐Ÿ’…
- **`Bitcode Version Number`** โ€” the bitcode version (not the LLVM version, bestie) of the file the analyzer read. ๐Ÿ‘‘
- **`File Size`** โ€” how big the whole bitcode file is, in bytes. ๐Ÿ’พ
- **`Module Bytes`** โ€” how big the module block is, in bytes. The percentage is relative to `File Size`. ๐ŸŒˆ
- **`Function Bytes`** โ€” how big all the function blocks are, in bytes. The percentage is relative to `File Size`. ๐Ÿ”ฅ
- **`Global Types Bytes`** โ€” how big the Global Types Pool is, in bytes. The percentage is relative to `File Size`. This is the size of the definitions of all types in the bitcode file. ๐ŸŽ€
- **`Constant Pool Bytes`** โ€” how big the Constant Pool Blocks are, in bytes. The percentage is relative to `File Size`. ๐Ÿ“
- **`Module Globals Bytes`** โ€” how big the Global Variable Definitions and their initializers are, in bytes. The percentage is relative to `File Size`. ๐Ÿ’œ
- **`Instruction List Bytes`** โ€” how big all the instruction lists in all the functions are, in bytes. The percentage is relative to `File Size`. Note that this value is also included in `Function Bytes`. โญ
- **`Compaction Table Bytes`** โ€” how big all the compaction tables in all the functions are, in bytes. The percentage is relative to `File Size`. Note that this value is also included in `Function Bytes`. ๐Ÿงš
- **`Symbol Table Bytes`** โ€” how big all the symbol tables in all the functions are, in bytes. The percentage is relative to `File Size`. Note that this value is also included in `Function Bytes`. ๐ŸŒธ
- **`Dependent Libraries Bytes`** โ€” how big the list of dependent libraries in the module is, in bytes. 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 count of blocks of any kind in the bitcode file. ๐Ÿ”ข
- **`Number Of Functions`** โ€” the total count of function definitions in the bitcode file. ๐Ÿ› ๏ธ
- **`Number Of Types`** โ€” the total count of types defined in the Global Types Pool. ๐Ÿงฌ
- **`Number Of Constants`** โ€” the total count of constants (of any type) defined in the Constant Pool. ๐Ÿฌ
- **`Number Of Basic Blocks`** โ€” the total count of basic blocks defined in all functions in the bitcode file. ๐Ÿงฑ
- **`Number Of Instructions`** โ€” the total count of instructions defined in all functions in the bitcode file. ๐Ÿ“œ
- **`Number Of Long Instructions`** โ€” the total count of long instructions defined in all functions in the bitcode file. Long instructions are those taking greater than `4` bytes. Typically long instructions are `GetElementPtr` with several indices, `PHI` nodes, and calls to functions with large numbers of arguments. ๐Ÿ˜ญ
- **`Number Of Operands`** โ€” the total count of operands used in all instructions in the bitcode file. ๐ŸŽฏ
- **`Number Of Compaction Tables`** โ€” the total count of compaction tables in all functions in the bitcode file. ๐Ÿ—œ๏ธ
- **`Number Of Symbol Tables`** โ€” the total count of symbol tables in all functions in the bitcode file. ๐Ÿ”ฃ
- **`Number Of Dependent Libs`** โ€” the total count 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. She computes this by dividing `Total Instruction Size` by `Number Of Instructions`. โš–๏ธ
- **`Maximum Type Slot Number`** โ€” the biggest value used for a type's slot number. Larger slot number values take more bytes to encode. ๐Ÿ”ข
- **`Maximum Value Slot Number`** โ€” the biggest value used for a value's slot number. Larger slot number values take more bytes to encode. ๐Ÿ”ข
- **`Bytes Per Value`** โ€” the average size of a `Value` definition (of any type). She computes this 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. She computes this by dividing `Function Bytes` by `Number Of Functions`. ๐Ÿงฎ
- **`# of VBR 32-bit Integers`** โ€” the total count of 32-bit integers encoded using the Variable Bit Rate encoding scheme. ๐ŸŒ€
- **`# of VBR 64-bit Integers`** โ€” the total count 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. ๐Ÿ™ˆ
- **`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`. ๐Ÿ’ฐ

---

# ๐Ÿ”ฌ DETAILED OUTPUT DEFINITIONS ๐Ÿ”ฌ

The following definitions occur only if the `-nodetails` option <hotpink>was not given</hotpink>. The detailed output provides additional information on a per-function basis. ๐Ÿซถ

- **`Type`** โ€” the type signature of the function. ๐Ÿงพ
- **`Byte Size`** โ€” the total number of bytes in the function's block. ๐Ÿ“ฆ
- **`Basic Blocks`** โ€” how many basic blocks the function defines. ๐Ÿงฑ
- **`Instructions`** โ€” how many instructions the function defines. ๐Ÿ“œ
- **`Long Instructions`** โ€” how many instructions in the function use the long instruction format. ๐Ÿ˜ญ
- **`Operands`** โ€” how many operands all the instructions in the function use. ๐ŸŽฏ
- **`Instruction Size`** โ€” how many bytes the instructions in the function eat up. ๐Ÿ“
- **`Average Instruction Size`** โ€” the average number of bytes the instructions in the function eat up. She computes this by dividing `Instruction Size` by `Instructions`. โš–๏ธ
- **`Bytes Per Instruction`** โ€” the average number of bytes the function uses per instruction. She computes this by dividing `Byte Size` by `Instructions`. Note that this is <red>not the same as</red> `Average Instruction Size` โ€” it computes a number relative to the total function size, not just the size of the instruction list. ๐Ÿ’€
- **`Number of VBR 32-bit Integers`** โ€” the total count of 32-bit integers found in this function (for any use). ๐ŸŒ€
- **`Number of VBR 64-bit Integers`** โ€” the total count 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 <>`

go read these too, bestie ๐Ÿ’–

---

# ๐ŸŒŸ Author ๐ŸŒŸ

Maintained by the LLVM Team (`https://llvm.org/`). ๐Ÿ‘‘

---

# ๐ŸŽ€ Copyright ๐ŸŽ€

`2003-2026, LLVM Project` ๐Ÿ’œ

---

<rainbow>xoxo, your LLVM bestie ๐Ÿ’–</rainbow> โ€” manual page `23`, dated `2026-10-20`, from `LLVM` โ€” `LLVM-BCANALYZER(1)` out. periodt ๐Ÿ’…โœจ
๐Ÿ“ฆ where this page comes from
  • arch rolling: llvm 23.1.4-1 ยท Apache-2.0 WITH LLVM-exception
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms