2 .TH "LLVM-BCANALYZER" "1" "2012-08-16" "3.2" "LLVM"
4 llvm-bcanalyzer \- LLVM bitcode analyzer
6 .nr rst2man-indent-level 0
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
18 .\" .rstReportMargin pre:
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
26 .\" indent \\n[an-margin]
27 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .nr rst2man-indent-level -1
29 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
32 .\" Man page generated from reStructuredText.
36 \fBllvm\-bcanalyzer\fP [\fIoptions\fP] [\fIfilename\fP]
39 The \fBllvm\-bcanalyzer\fP command is a small utility for analyzing bitcode files.
40 The tool reads a bitcode file (such as generated with the \fBllvm\-as\fP tool) and
41 produces a statistical report on the contents of the bitcode file. The tool
42 can also dump a low level but human readable version of the bitcode file.
43 This tool is probably not of much interest or utility except for those working
44 directly with the bitcode file format. Most LLVM users can just ignore
47 If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-bcanalyzer\fP reads its input
48 from standard input. This is useful for combining the tool into a pipeline.
49 Output is written to the standard output.
55 Causes \fBllvm\-bcanalyzer\fP to abbreviate its output by writing out only a module
56 level summary. The details for individual functions are not displayed.
63 Causes \fBllvm\-bcanalyzer\fP to dump the bitcode in a human readable format. This
64 format is significantly different from LLVM assembly and provides details about
65 the encoding of the bitcode file.
72 Causes \fBllvm\-bcanalyzer\fP to verify the module produced by reading the
73 bitcode. This ensures that the statistics generated are based on a consistent
81 Print a summary of command line options.
86 If \fBllvm\-bcanalyzer\fP succeeds, it will exit with 0. Otherwise, if an error
87 occurs, it will exit with a non\-zero value, usually 1.
88 .SH SUMMARY OUTPUT DEFINITIONS
90 The following items are always printed by llvm\-bcanalyzer. They comprize the
93 \fBBitcode Analysis Of Module\fP
96 This just provides the name of the module for which bitcode analysis is being
101 \fBBitcode Version Number\fP
104 The bitcode version (not LLVM version) of the file read by the analyzer.
111 The size, in bytes, of the entire bitcode file.
118 The size, in bytes, of the module block. Percentage is relative to File Size.
125 The size, in bytes, of all the function blocks. Percentage is relative to File
130 \fBGlobal Types Bytes\fP
133 The size, in bytes, of the Global Types Pool. Percentage is relative to File
134 Size. This is the size of the definitions of all types in the bitcode file.
138 \fBConstant Pool Bytes\fP
141 The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
146 \fBModule Globals Bytes\fP
149 Ths size, in bytes, of the Global Variable Definitions and their initializers.
150 Percentage is relative to File Size.
154 \fBInstruction List Bytes\fP
157 The size, in bytes, of all the instruction lists in all the functions.
158 Percentage is relative to File Size. Note that this value is also included in
163 \fBCompaction Table Bytes\fP
166 The size, in bytes, of all the compaction tables in all the functions.
167 Percentage is relative to File Size. Note that this value is also included in
172 \fBSymbol Table Bytes\fP
175 The size, in bytes, of all the symbol tables in all the functions. Percentage is
176 relative to File Size. Note that this value is also included in the Function
181 \fBDependent Libraries Bytes\fP
184 The size, in bytes, of the list of dependent libraries in the module. Percentage
185 is relative to File Size. Note that this value is also included in the Module
190 \fBNumber Of Bitcode Blocks\fP
193 The total number of blocks of any kind in the bitcode file.
197 \fBNumber Of Functions\fP
200 The total number of function definitions in the bitcode file.
204 \fBNumber Of Types\fP
207 The total number of types defined in the Global Types Pool.
211 \fBNumber Of Constants\fP
214 The total number of constants (of any type) defined in the Constant Pool.
218 \fBNumber Of Basic Blocks\fP
221 The total number of basic blocks defined in all functions in the bitcode file.
225 \fBNumber Of Instructions\fP
228 The total number of instructions defined in all functions in the bitcode file.
232 \fBNumber Of Long Instructions\fP
235 The total number of long instructions defined in all functions in the bitcode
236 file. Long instructions are those taking greater than 4 bytes. Typically long
237 instructions are GetElementPtr with several indices, PHI nodes, and calls to
238 functions with large numbers of arguments.
242 \fBNumber Of Operands\fP
245 The total number of operands used in all instructions in the bitcode file.
249 \fBNumber Of Compaction Tables\fP
252 The total number of compaction tables in all functions in the bitcode file.
256 \fBNumber Of Symbol Tables\fP
259 The total number of symbol tables in all functions in the bitcode file.
263 \fBNumber Of Dependent Libs\fP
266 The total number of dependent libraries found in the bitcode file.
270 \fBTotal Instruction Size\fP
273 The total size of the instructions in all functions in the bitcode file.
277 \fBAverage Instruction Size\fP
280 The average number of bytes per instruction across all functions in the bitcode
281 file. This value is computed by dividing Total Instruction Size by Number Of
286 \fBMaximum Type Slot Number\fP
289 The maximum value used for a type\(aqs slot number. Larger slot number values take
290 more bytes to encode.
294 \fBMaximum Value Slot Number\fP
297 The maximum value used for a value\(aqs slot number. Larger slot number values take
298 more bytes to encode.
302 \fBBytes Per Value\fP
305 The average size of a Value definition (of any type). This is computed by
306 dividing File Size by the total number of values of any type.
310 \fBBytes Per Global\fP
313 The average size of a global definition (constants and global variables).
317 \fBBytes Per Function\fP
320 The average number of bytes per function definition. This is computed by
321 dividing Function Bytes by Number Of Functions.
325 \fB# of VBR 32\-bit Integers\fP
328 The total number of 32\-bit integers encoded using the Variable Bit Rate
333 \fB# of VBR 64\-bit Integers\fP
336 The total number of 64\-bit integers encoded using the Variable Bit Rate encoding
341 \fB# of VBR Compressed Bytes\fP
344 The total number of bytes consumed by the 32\-bit and 64\-bit integers that use
345 the Variable Bit Rate encoding scheme.
349 \fB# of VBR Expanded Bytes\fP
352 The total number of bytes that would have been consumed by the 32\-bit and 64\-bit
353 integers had they not been compressed with the Variable Bit Rage encoding
358 \fBBytes Saved With VBR\fP
361 The total number of bytes saved by using the Variable Bit Rate encoding scheme.
362 The percentage is relative to # of VBR Expanded Bytes.
365 .SH DETAILED OUTPUT DEFINITIONS
367 The following definitions occur only if the \-nodetails option was not given.
368 The detailed output provides additional information on a per\-function basis.
373 The type signature of the function.
380 The total number of bytes in the function\(aqs block.
387 The number of basic blocks defined by the function.
394 The number of instructions defined by the function.
398 \fBLong Instructions\fP
401 The number of instructions using the long instruction format in the function.
408 The number of operands used by all instructions in the function.
412 \fBInstruction Size\fP
415 The number of bytes consumed by instructions in the function.
419 \fBAverage Instruction Size\fP
422 The average number of bytes consumed by the instructions in the function. This
423 value is computed by dividing Instruction Size by Instructions.
427 \fBBytes Per Instruction\fP
430 The average number of bytes used by the function per instruction. This value is
431 computed by dividing Byte Size by Instructions. Note that this is not the same
432 as Average Instruction Size. It computes a number relative to the total function
433 size not just the size of the instruction list.
437 \fBNumber of VBR 32\-bit Integers\fP
440 The total number of 32\-bit integers found in this function (for any use).
444 \fBNumber of VBR 64\-bit Integers\fP
447 The total number of 64\-bit integers found in this function (for any use).
451 \fBNumber of VBR Compressed Bytes\fP
454 The total number of bytes in this function consumed by the 32\-bit and 64\-bit
455 integers that use the Variable Bit Rate encoding scheme.
459 \fBNumber of VBR Expanded Bytes\fP
462 The total number of bytes in this function that would have been consumed by
463 the 32\-bit and 64\-bit integers had they not been compressed with the Variable
464 Bit Rate encoding scheme.
468 \fBBytes Saved With VBR\fP
471 The total number of bytes saved in this function by using the Variable Bit
472 Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.
477 llvm\-dis|llvm\-dis, \fI\%http://llvm.org/docs/BitCodeFormat.html\fP
479 Maintained by The LLVM Team (http://llvm.org/).
482 .\" Generated by docutils manpage writer.