]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
MFC r244628:
[FreeBSD/stable/9.git] / usr.bin / clang / llvm-bcanalyzer / llvm-bcanalyzer.1
1 .\" $FreeBSD$
2 .TH "LLVM-BCANALYZER" "1" "2012-08-16" "3.2" "LLVM"
3 .SH NAME
4 llvm-bcanalyzer \- LLVM bitcode analyzer
5 .
6 .nr rst2man-indent-level 0
7 .
8 .de1 rstReportMargin
9 \\$1 \\n[an-margin]
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
12 -
13 \\n[rst2man-indent0]
14 \\n[rst2man-indent1]
15 \\n[rst2man-indent2]
16 ..
17 .de1 INDENT
18 .\" .rstReportMargin pre:
19 . RS \\$1
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
23 ..
24 .de UNINDENT
25 . RE
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
31 ..
32 .\" Man page generated from reStructuredText.
33 .
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-bcanalyzer\fP [\fIoptions\fP] [\fIfilename\fP]
37 .SH DESCRIPTION
38 .sp
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
45 this tool.
46 .sp
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.
50 .SH OPTIONS
51 .sp
52 \fB\-nodetails\fP
53 .INDENT 0.0
54 .INDENT 3.5
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.
57 .UNINDENT
58 .UNINDENT
59 .sp
60 \fB\-dump\fP
61 .INDENT 0.0
62 .INDENT 3.5
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.
66 .UNINDENT
67 .UNINDENT
68 .sp
69 \fB\-verify\fP
70 .INDENT 0.0
71 .INDENT 3.5
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
74 module.
75 .UNINDENT
76 .UNINDENT
77 .sp
78 \fB\-help\fP
79 .INDENT 0.0
80 .INDENT 3.5
81 Print a summary of command line options.
82 .UNINDENT
83 .UNINDENT
84 .SH EXIT STATUS
85 .sp
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
89 .sp
90 The following items are always printed by llvm\-bcanalyzer. They comprize the
91 summary output.
92 .sp
93 \fBBitcode Analysis Of Module\fP
94 .INDENT 0.0
95 .INDENT 3.5
96 This just provides the name of the module for which bitcode analysis is being
97 generated.
98 .UNINDENT
99 .UNINDENT
100 .sp
101 \fBBitcode Version Number\fP
102 .INDENT 0.0
103 .INDENT 3.5
104 The bitcode version (not LLVM version) of the file read by the analyzer.
105 .UNINDENT
106 .UNINDENT
107 .sp
108 \fBFile Size\fP
109 .INDENT 0.0
110 .INDENT 3.5
111 The size, in bytes, of the entire bitcode file.
112 .UNINDENT
113 .UNINDENT
114 .sp
115 \fBModule Bytes\fP
116 .INDENT 0.0
117 .INDENT 3.5
118 The size, in bytes, of the module block. Percentage is relative to File Size.
119 .UNINDENT
120 .UNINDENT
121 .sp
122 \fBFunction Bytes\fP
123 .INDENT 0.0
124 .INDENT 3.5
125 The size, in bytes, of all the function blocks. Percentage is relative to File
126 Size.
127 .UNINDENT
128 .UNINDENT
129 .sp
130 \fBGlobal Types Bytes\fP
131 .INDENT 0.0
132 .INDENT 3.5
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.
135 .UNINDENT
136 .UNINDENT
137 .sp
138 \fBConstant Pool Bytes\fP
139 .INDENT 0.0
140 .INDENT 3.5
141 The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
142 Size.
143 .UNINDENT
144 .UNINDENT
145 .sp
146 \fBModule Globals Bytes\fP
147 .INDENT 0.0
148 .INDENT 3.5
149 Ths size, in bytes, of the Global Variable Definitions and their initializers.
150 Percentage is relative to File Size.
151 .UNINDENT
152 .UNINDENT
153 .sp
154 \fBInstruction List Bytes\fP
155 .INDENT 0.0
156 .INDENT 3.5
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
159 the Function Bytes.
160 .UNINDENT
161 .UNINDENT
162 .sp
163 \fBCompaction Table Bytes\fP
164 .INDENT 0.0
165 .INDENT 3.5
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
168 the Function Bytes.
169 .UNINDENT
170 .UNINDENT
171 .sp
172 \fBSymbol Table Bytes\fP
173 .INDENT 0.0
174 .INDENT 3.5
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
177 Bytes.
178 .UNINDENT
179 .UNINDENT
180 .sp
181 \fBDependent Libraries Bytes\fP
182 .INDENT 0.0
183 .INDENT 3.5
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
186 Global Bytes.
187 .UNINDENT
188 .UNINDENT
189 .sp
190 \fBNumber Of Bitcode Blocks\fP
191 .INDENT 0.0
192 .INDENT 3.5
193 The total number of blocks of any kind in the bitcode file.
194 .UNINDENT
195 .UNINDENT
196 .sp
197 \fBNumber Of Functions\fP
198 .INDENT 0.0
199 .INDENT 3.5
200 The total number of function definitions in the bitcode file.
201 .UNINDENT
202 .UNINDENT
203 .sp
204 \fBNumber Of Types\fP
205 .INDENT 0.0
206 .INDENT 3.5
207 The total number of types defined in the Global Types Pool.
208 .UNINDENT
209 .UNINDENT
210 .sp
211 \fBNumber Of Constants\fP
212 .INDENT 0.0
213 .INDENT 3.5
214 The total number of constants (of any type) defined in the Constant Pool.
215 .UNINDENT
216 .UNINDENT
217 .sp
218 \fBNumber Of Basic Blocks\fP
219 .INDENT 0.0
220 .INDENT 3.5
221 The total number of basic blocks defined in all functions in the bitcode file.
222 .UNINDENT
223 .UNINDENT
224 .sp
225 \fBNumber Of Instructions\fP
226 .INDENT 0.0
227 .INDENT 3.5
228 The total number of instructions defined in all functions in the bitcode file.
229 .UNINDENT
230 .UNINDENT
231 .sp
232 \fBNumber Of Long Instructions\fP
233 .INDENT 0.0
234 .INDENT 3.5
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.
239 .UNINDENT
240 .UNINDENT
241 .sp
242 \fBNumber Of Operands\fP
243 .INDENT 0.0
244 .INDENT 3.5
245 The total number of operands used in all instructions in the bitcode file.
246 .UNINDENT
247 .UNINDENT
248 .sp
249 \fBNumber Of Compaction Tables\fP
250 .INDENT 0.0
251 .INDENT 3.5
252 The total number of compaction tables in all functions in the bitcode file.
253 .UNINDENT
254 .UNINDENT
255 .sp
256 \fBNumber Of Symbol Tables\fP
257 .INDENT 0.0
258 .INDENT 3.5
259 The total number of symbol tables in all functions in the bitcode file.
260 .UNINDENT
261 .UNINDENT
262 .sp
263 \fBNumber Of Dependent Libs\fP
264 .INDENT 0.0
265 .INDENT 3.5
266 The total number of dependent libraries found in the bitcode file.
267 .UNINDENT
268 .UNINDENT
269 .sp
270 \fBTotal Instruction Size\fP
271 .INDENT 0.0
272 .INDENT 3.5
273 The total size of the instructions in all functions in the bitcode file.
274 .UNINDENT
275 .UNINDENT
276 .sp
277 \fBAverage Instruction Size\fP
278 .INDENT 0.0
279 .INDENT 3.5
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
282 Instructions.
283 .UNINDENT
284 .UNINDENT
285 .sp
286 \fBMaximum Type Slot Number\fP
287 .INDENT 0.0
288 .INDENT 3.5
289 The maximum value used for a type\(aqs slot number. Larger slot number values take
290 more bytes to encode.
291 .UNINDENT
292 .UNINDENT
293 .sp
294 \fBMaximum Value Slot Number\fP
295 .INDENT 0.0
296 .INDENT 3.5
297 The maximum value used for a value\(aqs slot number. Larger slot number values take
298 more bytes to encode.
299 .UNINDENT
300 .UNINDENT
301 .sp
302 \fBBytes Per Value\fP
303 .INDENT 0.0
304 .INDENT 3.5
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.
307 .UNINDENT
308 .UNINDENT
309 .sp
310 \fBBytes Per Global\fP
311 .INDENT 0.0
312 .INDENT 3.5
313 The average size of a global definition (constants and global variables).
314 .UNINDENT
315 .UNINDENT
316 .sp
317 \fBBytes Per Function\fP
318 .INDENT 0.0
319 .INDENT 3.5
320 The average number of bytes per function definition. This is computed by
321 dividing Function Bytes by Number Of Functions.
322 .UNINDENT
323 .UNINDENT
324 .sp
325 \fB# of VBR 32\-bit Integers\fP
326 .INDENT 0.0
327 .INDENT 3.5
328 The total number of 32\-bit integers encoded using the Variable Bit Rate
329 encoding scheme.
330 .UNINDENT
331 .UNINDENT
332 .sp
333 \fB# of VBR 64\-bit Integers\fP
334 .INDENT 0.0
335 .INDENT 3.5
336 The total number of 64\-bit integers encoded using the Variable Bit Rate encoding
337 scheme.
338 .UNINDENT
339 .UNINDENT
340 .sp
341 \fB# of VBR Compressed Bytes\fP
342 .INDENT 0.0
343 .INDENT 3.5
344 The total number of bytes consumed by the 32\-bit and 64\-bit integers that use
345 the Variable Bit Rate encoding scheme.
346 .UNINDENT
347 .UNINDENT
348 .sp
349 \fB# of VBR Expanded Bytes\fP
350 .INDENT 0.0
351 .INDENT 3.5
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
354 scheme.
355 .UNINDENT
356 .UNINDENT
357 .sp
358 \fBBytes Saved With VBR\fP
359 .INDENT 0.0
360 .INDENT 3.5
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.
363 .UNINDENT
364 .UNINDENT
365 .SH DETAILED OUTPUT DEFINITIONS
366 .sp
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.
369 .sp
370 \fBType\fP
371 .INDENT 0.0
372 .INDENT 3.5
373 The type signature of the function.
374 .UNINDENT
375 .UNINDENT
376 .sp
377 \fBByte Size\fP
378 .INDENT 0.0
379 .INDENT 3.5
380 The total number of bytes in the function\(aqs block.
381 .UNINDENT
382 .UNINDENT
383 .sp
384 \fBBasic Blocks\fP
385 .INDENT 0.0
386 .INDENT 3.5
387 The number of basic blocks defined by the function.
388 .UNINDENT
389 .UNINDENT
390 .sp
391 \fBInstructions\fP
392 .INDENT 0.0
393 .INDENT 3.5
394 The number of instructions defined by the function.
395 .UNINDENT
396 .UNINDENT
397 .sp
398 \fBLong Instructions\fP
399 .INDENT 0.0
400 .INDENT 3.5
401 The number of instructions using the long instruction format in the function.
402 .UNINDENT
403 .UNINDENT
404 .sp
405 \fBOperands\fP
406 .INDENT 0.0
407 .INDENT 3.5
408 The number of operands used by all instructions in the function.
409 .UNINDENT
410 .UNINDENT
411 .sp
412 \fBInstruction Size\fP
413 .INDENT 0.0
414 .INDENT 3.5
415 The number of bytes consumed by instructions in the function.
416 .UNINDENT
417 .UNINDENT
418 .sp
419 \fBAverage Instruction Size\fP
420 .INDENT 0.0
421 .INDENT 3.5
422 The average number of bytes consumed by the instructions in the function. This
423 value is computed by dividing Instruction Size by Instructions.
424 .UNINDENT
425 .UNINDENT
426 .sp
427 \fBBytes Per Instruction\fP
428 .INDENT 0.0
429 .INDENT 3.5
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.
434 .UNINDENT
435 .UNINDENT
436 .sp
437 \fBNumber of VBR 32\-bit Integers\fP
438 .INDENT 0.0
439 .INDENT 3.5
440 The total number of 32\-bit integers found in this function (for any use).
441 .UNINDENT
442 .UNINDENT
443 .sp
444 \fBNumber of VBR 64\-bit Integers\fP
445 .INDENT 0.0
446 .INDENT 3.5
447 The total number of 64\-bit integers found in this function (for any use).
448 .UNINDENT
449 .UNINDENT
450 .sp
451 \fBNumber of VBR Compressed Bytes\fP
452 .INDENT 0.0
453 .INDENT 3.5
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.
456 .UNINDENT
457 .UNINDENT
458 .sp
459 \fBNumber of VBR Expanded Bytes\fP
460 .INDENT 0.0
461 .INDENT 3.5
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.
465 .UNINDENT
466 .UNINDENT
467 .sp
468 \fBBytes Saved With VBR\fP
469 .INDENT 0.0
470 .INDENT 3.5
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.
473 .UNINDENT
474 .UNINDENT
475 .SH SEE ALSO
476 .sp
477 llvm\-dis|llvm\-dis, \fI\%http://llvm.org/docs/BitCodeFormat.html\fP
478 .SH AUTHOR
479 Maintained by The LLVM Team (http://llvm.org/).
480 .SH COPYRIGHT
481 2012, LLVM Project
482 .\" Generated by docutils manpage writer.
483 .