1LLVM-BCANALYZER(1) LLVM LLVM-BCANALYZER(1)
2
3
4
6 llvm-bcanalyzer - LLVM bitcode analyzer
7
9 llvm-bcanalyzer [options] [filename]
10
12 The llvm-bcanalyzer command is a small utility for analyzing bitcode
13 files. The tool reads a bitcode file (such as generated with the
14 llvm-as tool) and produces a statistical report on the contents of the
15 bitcode file. The tool can also dump a low level but human readable
16 version of the bitcode file. This tool is probably not of much inter‐
17 est or utility except for those working directly with the bitcode file
18 format. Most LLVM users can just ignore this tool.
19
20 If filename is omitted or is -, then llvm-bcanalyzer reads its input
21 from standard input. This is useful for combining the tool into a
22 pipeline. Output is written to the standard output.
23
25 --dump Causes llvm-bcanalyzer to dump the bitcode in a human readable
26 format. This format is significantly different from LLVM assem‐
27 bly and provides details about the encoding of the bitcode file.
28
29 --help Print a summary of command line options.
30
32 If llvm-bcanalyzer succeeds, it will exit with 0. Otherwise, if an er‐
33 ror occurs, it will exit with a non-zero value, usually 1.
34
36 The following items are always printed by llvm-bcanalyzer. They com‐
37 prize the summary output.
38
39 Bitcode Analysis Of Module
40 This just provides the name of the module for which bitcode analysis
41 is being generated.
42
43 Bitcode Version Number
44 The bitcode version (not LLVM version) of the file read by the ana‐
45 lyzer.
46
47 File Size
48 The size, in bytes, of the entire bitcode file.
49
50 Module Bytes
51 The size, in bytes, of the module block. Percentage is relative to
52 File Size.
53
54 Function Bytes
55 The size, in bytes, of all the function blocks. Percentage is rela‐
56 tive to File Size.
57
58 Global Types Bytes
59 The size, in bytes, of the Global Types Pool. Percentage is rela‐
60 tive to File Size. This is the size of the definitions of all types
61 in the bitcode file.
62
63 Constant Pool Bytes
64 The size, in bytes, of the Constant Pool Blocks Percentage is rela‐
65 tive to File Size.
66
67 Module Globals Bytes
68 Ths size, in bytes, of the Global Variable Definitions and their
69 initializers. Percentage is relative to File Size.
70
71 Instruction List Bytes
72 The size, in bytes, of all the instruction lists in all the func‐
73 tions. Percentage is relative to File Size. Note that this value
74 is also included in the Function Bytes.
75
76 Compaction Table Bytes
77 The size, in bytes, of all the compaction tables in all the func‐
78 tions. Percentage is relative to File Size. Note that this value
79 is also included in the Function Bytes.
80
81 Symbol Table Bytes
82 The size, in bytes, of all the symbol tables in all the functions.
83 Percentage is relative to File Size. Note that this value is also
84 included in the Function Bytes.
85
86 Dependent Libraries Bytes
87 The size, in bytes, of the list of dependent libraries in the mod‐
88 ule. Percentage is relative to File Size. Note that this value is
89 also included in the Module Global Bytes.
90
91 Number Of Bitcode Blocks
92 The total number of blocks of any kind in the bitcode file.
93
94 Number Of Functions
95 The total number of function definitions in the bitcode file.
96
97 Number Of Types
98 The total number of types defined in the Global Types Pool.
99
100 Number Of Constants
101 The total number of constants (of any type) defined in the Constant
102 Pool.
103
104 Number Of Basic Blocks
105 The total number of basic blocks defined in all functions in the
106 bitcode file.
107
108 Number Of Instructions
109 The total number of instructions defined in all functions in the
110 bitcode file.
111
112 Number Of Long Instructions
113 The total number of long instructions defined in all functions in
114 the bitcode file. Long instructions are those taking greater than 4
115 bytes. Typically long instructions are GetElementPtr with several
116 indices, PHI nodes, and calls to functions with large numbers of ar‐
117 guments.
118
119 Number Of Operands
120 The total number of operands used in all instructions in the bitcode
121 file.
122
123 Number Of Compaction Tables
124 The total number of compaction tables in all functions in the bit‐
125 code file.
126
127 Number Of Symbol Tables
128 The total number of symbol tables in all functions in the bitcode
129 file.
130
131 Number Of Dependent Libs
132 The total number of dependent libraries found in the bitcode file.
133
134 Total Instruction Size
135 The total size of the instructions in all functions in the bitcode
136 file.
137
138 Average Instruction Size
139 The average number of bytes per instruction across all functions in
140 the bitcode file. This value is computed by dividing Total Instruc‐
141 tion Size by Number Of Instructions.
142
143 Maximum Type Slot Number
144 The maximum value used for a type's slot number. Larger slot number
145 values take more bytes to encode.
146
147 Maximum Value Slot Number
148 The maximum value used for a value's slot number. Larger slot num‐
149 ber values take more bytes to encode.
150
151 Bytes Per Value
152 The average size of a Value definition (of any type). This is com‐
153 puted by dividing File Size by the total number of values of any
154 type.
155
156 Bytes Per Global
157 The average size of a global definition (constants and global vari‐
158 ables).
159
160 Bytes Per Function
161 The average number of bytes per function definition. This is com‐
162 puted by dividing Function Bytes by Number Of Functions.
163
164 # of VBR 32-bit Integers
165 The total number of 32-bit integers encoded using the Variable Bit
166 Rate encoding scheme.
167
168 # of VBR 64-bit Integers
169 The total number of 64-bit integers encoded using the Variable Bit
170 Rate encoding scheme.
171
172 # of VBR Compressed Bytes
173 The total number of bytes consumed by the 32-bit and 64-bit integers
174 that use the Variable Bit Rate encoding scheme.
175
176 # of VBR Expanded Bytes
177 The total number of bytes that would have been consumed by the
178 32-bit and 64-bit integers had they not been compressed with the
179 Variable Bit Rage encoding scheme.
180
181 Bytes Saved With VBR
182 The total number of bytes saved by using the Variable Bit Rate en‐
183 coding scheme. The percentage is relative to # of VBR Expanded
184 Bytes.
185
187 The following definitions occur only if the -nodetails option was not
188 given. The detailed output provides additional information on a
189 per-function basis.
190
191 Type
192 The type signature of the function.
193
194 Byte Size
195 The total number of bytes in the function's block.
196
197 Basic Blocks
198 The number of basic blocks defined by the function.
199
200 Instructions
201 The number of instructions defined by the function.
202
203 Long Instructions
204 The number of instructions using the long instruction format in the
205 function.
206
207 Operands
208 The number of operands used by all instructions in the function.
209
210 Instruction Size
211 The number of bytes consumed by instructions in the function.
212
213 Average Instruction Size
214 The average number of bytes consumed by the instructions in the
215 function. This value is computed by dividing Instruction Size by
216 Instructions.
217
218 Bytes Per Instruction
219 The average number of bytes used by the function per instruction.
220 This value is computed by dividing Byte Size by Instructions. Note
221 that this is not the same as Average Instruction Size. It computes
222 a number relative to the total function size not just the size of
223 the instruction list.
224
225 Number of VBR 32-bit Integers
226 The total number of 32-bit integers found in this function (for any
227 use).
228
229 Number of VBR 64-bit Integers
230 The total number of 64-bit integers found in this function (for any
231 use).
232
233 Number of VBR Compressed Bytes
234 The total number of bytes in this function consumed by the 32-bit
235 and 64-bit integers that use the Variable Bit Rate encoding scheme.
236
237 Number of VBR Expanded Bytes
238 The total number of bytes in this function that would have been con‐
239 sumed by the 32-bit and 64-bit integers had they not been compressed
240 with the Variable Bit Rate encoding scheme.
241
242 Bytes Saved With VBR
243 The total number of bytes saved in this function by using the Vari‐
244 able Bit Rate encoding scheme. The percentage is relative to # of
245 VBR Expanded Bytes.
246
248 llvm-dis(1), LLVM Bitcode File Format
249
251 Maintained by the LLVM Team (https://llvm.org/).
252
254 2003-2023, LLVM Project
255
256
257
258
25915 2023-07-20 LLVM-BCANALYZER(1)