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