]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.bin / clang / llvm-bcanalyzer / llvm-bcanalyzer.1
1 .\" $FreeBSD$
2 .TH "LLVM-BCANALYZER" "1" "2013-04-11" "3.3" "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
40 files.  The tool reads a bitcode file (such as generated with the
41 \fBllvm\-as\fP tool) and produces a statistical report on the contents of
42 the bitcode file.  The tool can also dump a low level but human readable
43 version of the bitcode file.  This tool is probably not of much interest or
44 utility except for those working directly with the bitcode file format.  Most
45 LLVM users can just ignore this tool.
46 .sp
47 If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-bcanalyzer\fP reads its
48 input from standard input.  This is useful for combining the tool into a
49 pipeline.  Output is written to the standard output.
50 .SH OPTIONS
51 .INDENT 0.0
52 .TP
53 .B \-nodetails
54 Causes \fBllvm\-bcanalyzer\fP to abbreviate its output by writing out only
55 a module level summary.  The details for individual functions are not
56 displayed.
57 .UNINDENT
58 .INDENT 0.0
59 .TP
60 .B \-dump
61 Causes \fBllvm\-bcanalyzer\fP to dump the bitcode in a human readable
62 format.  This format is significantly different from LLVM assembly and
63 provides details about the encoding of the bitcode file.
64 .UNINDENT
65 .INDENT 0.0
66 .TP
67 .B \-verify
68 Causes \fBllvm\-bcanalyzer\fP to verify the module produced by reading the
69 bitcode.  This ensures that the statistics generated are based on a consistent
70 module.
71 .UNINDENT
72 .INDENT 0.0
73 .TP
74 .B \-help
75 Print a summary of command line options.
76 .UNINDENT
77 .SH EXIT STATUS
78 .sp
79 If \fBllvm\-bcanalyzer\fP succeeds, it will exit with 0.  Otherwise, if an
80 error occurs, it will exit with a non\-zero value, usually 1.
81 .SH SUMMARY OUTPUT DEFINITIONS
82 .sp
83 The following items are always printed by llvm\-bcanalyzer.  They comprize the
84 summary output.
85 .sp
86 \fBBitcode Analysis Of Module\fP
87 .INDENT 0.0
88 .INDENT 3.5
89 This just provides the name of the module for which bitcode analysis is being
90 generated.
91 .UNINDENT
92 .UNINDENT
93 .sp
94 \fBBitcode Version Number\fP
95 .INDENT 0.0
96 .INDENT 3.5
97 The bitcode version (not LLVM version) of the file read by the analyzer.
98 .UNINDENT
99 .UNINDENT
100 .sp
101 \fBFile Size\fP
102 .INDENT 0.0
103 .INDENT 3.5
104 The size, in bytes, of the entire bitcode file.
105 .UNINDENT
106 .UNINDENT
107 .sp
108 \fBModule Bytes\fP
109 .INDENT 0.0
110 .INDENT 3.5
111 The size, in bytes, of the module block.  Percentage is relative to File Size.
112 .UNINDENT
113 .UNINDENT
114 .sp
115 \fBFunction Bytes\fP
116 .INDENT 0.0
117 .INDENT 3.5
118 The size, in bytes, of all the function blocks.  Percentage is relative to File
119 Size.
120 .UNINDENT
121 .UNINDENT
122 .sp
123 \fBGlobal Types Bytes\fP
124 .INDENT 0.0
125 .INDENT 3.5
126 The size, in bytes, of the Global Types Pool.  Percentage is relative to File
127 Size.  This is the size of the definitions of all types in the bitcode file.
128 .UNINDENT
129 .UNINDENT
130 .sp
131 \fBConstant Pool Bytes\fP
132 .INDENT 0.0
133 .INDENT 3.5
134 The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
135 Size.
136 .UNINDENT
137 .UNINDENT
138 .sp
139 \fBModule Globals Bytes\fP
140 .INDENT 0.0
141 .INDENT 3.5
142 Ths size, in bytes, of the Global Variable Definitions and their initializers.
143 Percentage is relative to File Size.
144 .UNINDENT
145 .UNINDENT
146 .sp
147 \fBInstruction List Bytes\fP
148 .INDENT 0.0
149 .INDENT 3.5
150 The size, in bytes, of all the instruction lists in all the functions.
151 Percentage is relative to File Size.  Note that this value is also included in
152 the Function Bytes.
153 .UNINDENT
154 .UNINDENT
155 .sp
156 \fBCompaction Table Bytes\fP
157 .INDENT 0.0
158 .INDENT 3.5
159 The size, in bytes, of all the compaction tables in all the functions.
160 Percentage is relative to File Size.  Note that this value is also included in
161 the Function Bytes.
162 .UNINDENT
163 .UNINDENT
164 .sp
165 \fBSymbol Table Bytes\fP
166 .INDENT 0.0
167 .INDENT 3.5
168 The size, in bytes, of all the symbol tables in all the functions.  Percentage is
169 relative to File Size.  Note that this value is also included in the Function
170 Bytes.
171 .UNINDENT
172 .UNINDENT
173 .sp
174 \fBDependent Libraries Bytes\fP
175 .INDENT 0.0
176 .INDENT 3.5
177 The size, in bytes, of the list of dependent libraries in the module.  Percentage
178 is relative to File Size.  Note that this value is also included in the Module
179 Global Bytes.
180 .UNINDENT
181 .UNINDENT
182 .sp
183 \fBNumber Of Bitcode Blocks\fP
184 .INDENT 0.0
185 .INDENT 3.5
186 The total number of blocks of any kind in the bitcode file.
187 .UNINDENT
188 .UNINDENT
189 .sp
190 \fBNumber Of Functions\fP
191 .INDENT 0.0
192 .INDENT 3.5
193 The total number of function definitions in the bitcode file.
194 .UNINDENT
195 .UNINDENT
196 .sp
197 \fBNumber Of Types\fP
198 .INDENT 0.0
199 .INDENT 3.5
200 The total number of types defined in the Global Types Pool.
201 .UNINDENT
202 .UNINDENT
203 .sp
204 \fBNumber Of Constants\fP
205 .INDENT 0.0
206 .INDENT 3.5
207 The total number of constants (of any type) defined in the Constant Pool.
208 .UNINDENT
209 .UNINDENT
210 .sp
211 \fBNumber Of Basic Blocks\fP
212 .INDENT 0.0
213 .INDENT 3.5
214 The total number of basic blocks defined in all functions in the bitcode file.
215 .UNINDENT
216 .UNINDENT
217 .sp
218 \fBNumber Of Instructions\fP
219 .INDENT 0.0
220 .INDENT 3.5
221 The total number of instructions defined in all functions in the bitcode file.
222 .UNINDENT
223 .UNINDENT
224 .sp
225 \fBNumber Of Long Instructions\fP
226 .INDENT 0.0
227 .INDENT 3.5
228 The total number of long instructions defined in all functions in the bitcode
229 file.  Long instructions are those taking greater than 4 bytes.  Typically long
230 instructions are GetElementPtr with several indices, PHI nodes, and calls to
231 functions with large numbers of arguments.
232 .UNINDENT
233 .UNINDENT
234 .sp
235 \fBNumber Of Operands\fP
236 .INDENT 0.0
237 .INDENT 3.5
238 The total number of operands used in all instructions in the bitcode file.
239 .UNINDENT
240 .UNINDENT
241 .sp
242 \fBNumber Of Compaction Tables\fP
243 .INDENT 0.0
244 .INDENT 3.5
245 The total number of compaction tables in all functions in the bitcode file.
246 .UNINDENT
247 .UNINDENT
248 .sp
249 \fBNumber Of Symbol Tables\fP
250 .INDENT 0.0
251 .INDENT 3.5
252 The total number of symbol tables in all functions in the bitcode file.
253 .UNINDENT
254 .UNINDENT
255 .sp
256 \fBNumber Of Dependent Libs\fP
257 .INDENT 0.0
258 .INDENT 3.5
259 The total number of dependent libraries found in the bitcode file.
260 .UNINDENT
261 .UNINDENT
262 .sp
263 \fBTotal Instruction Size\fP
264 .INDENT 0.0
265 .INDENT 3.5
266 The total size of the instructions in all functions in the bitcode file.
267 .UNINDENT
268 .UNINDENT
269 .sp
270 \fBAverage Instruction Size\fP
271 .INDENT 0.0
272 .INDENT 3.5
273 The average number of bytes per instruction across all functions in the bitcode
274 file.  This value is computed by dividing Total Instruction Size by Number Of
275 Instructions.
276 .UNINDENT
277 .UNINDENT
278 .sp
279 \fBMaximum Type Slot Number\fP
280 .INDENT 0.0
281 .INDENT 3.5
282 The maximum value used for a type\(aqs slot number.  Larger slot number values take
283 more bytes to encode.
284 .UNINDENT
285 .UNINDENT
286 .sp
287 \fBMaximum Value Slot Number\fP
288 .INDENT 0.0
289 .INDENT 3.5
290 The maximum value used for a value\(aqs slot number.  Larger slot number values take
291 more bytes to encode.
292 .UNINDENT
293 .UNINDENT
294 .sp
295 \fBBytes Per Value\fP
296 .INDENT 0.0
297 .INDENT 3.5
298 The average size of a Value definition (of any type).  This is computed by
299 dividing File Size by the total number of values of any type.
300 .UNINDENT
301 .UNINDENT
302 .sp
303 \fBBytes Per Global\fP
304 .INDENT 0.0
305 .INDENT 3.5
306 The average size of a global definition (constants and global variables).
307 .UNINDENT
308 .UNINDENT
309 .sp
310 \fBBytes Per Function\fP
311 .INDENT 0.0
312 .INDENT 3.5
313 The average number of bytes per function definition.  This is computed by
314 dividing Function Bytes by Number Of Functions.
315 .UNINDENT
316 .UNINDENT
317 .sp
318 \fB# of VBR 32\-bit Integers\fP
319 .INDENT 0.0
320 .INDENT 3.5
321 The total number of 32\-bit integers encoded using the Variable Bit Rate
322 encoding scheme.
323 .UNINDENT
324 .UNINDENT
325 .sp
326 \fB# of VBR 64\-bit Integers\fP
327 .INDENT 0.0
328 .INDENT 3.5
329 The total number of 64\-bit integers encoded using the Variable Bit Rate encoding
330 scheme.
331 .UNINDENT
332 .UNINDENT
333 .sp
334 \fB# of VBR Compressed Bytes\fP
335 .INDENT 0.0
336 .INDENT 3.5
337 The total number of bytes consumed by the 32\-bit and 64\-bit integers that use
338 the Variable Bit Rate encoding scheme.
339 .UNINDENT
340 .UNINDENT
341 .sp
342 \fB# of VBR Expanded Bytes\fP
343 .INDENT 0.0
344 .INDENT 3.5
345 The total number of bytes that would have been consumed by the 32\-bit and 64\-bit
346 integers had they not been compressed with the Variable Bit Rage encoding
347 scheme.
348 .UNINDENT
349 .UNINDENT
350 .sp
351 \fBBytes Saved With VBR\fP
352 .INDENT 0.0
353 .INDENT 3.5
354 The total number of bytes saved by using the Variable Bit Rate encoding scheme.
355 The percentage is relative to # of VBR Expanded Bytes.
356 .UNINDENT
357 .UNINDENT
358 .SH DETAILED OUTPUT DEFINITIONS
359 .sp
360 The following definitions occur only if the \-nodetails option was not given.
361 The detailed output provides additional information on a per\-function basis.
362 .sp
363 \fBType\fP
364 .INDENT 0.0
365 .INDENT 3.5
366 The type signature of the function.
367 .UNINDENT
368 .UNINDENT
369 .sp
370 \fBByte Size\fP
371 .INDENT 0.0
372 .INDENT 3.5
373 The total number of bytes in the function\(aqs block.
374 .UNINDENT
375 .UNINDENT
376 .sp
377 \fBBasic Blocks\fP
378 .INDENT 0.0
379 .INDENT 3.5
380 The number of basic blocks defined by the function.
381 .UNINDENT
382 .UNINDENT
383 .sp
384 \fBInstructions\fP
385 .INDENT 0.0
386 .INDENT 3.5
387 The number of instructions defined by the function.
388 .UNINDENT
389 .UNINDENT
390 .sp
391 \fBLong Instructions\fP
392 .INDENT 0.0
393 .INDENT 3.5
394 The number of instructions using the long instruction format in the function.
395 .UNINDENT
396 .UNINDENT
397 .sp
398 \fBOperands\fP
399 .INDENT 0.0
400 .INDENT 3.5
401 The number of operands used by all instructions in the function.
402 .UNINDENT
403 .UNINDENT
404 .sp
405 \fBInstruction Size\fP
406 .INDENT 0.0
407 .INDENT 3.5
408 The number of bytes consumed by instructions in the function.
409 .UNINDENT
410 .UNINDENT
411 .sp
412 \fBAverage Instruction Size\fP
413 .INDENT 0.0
414 .INDENT 3.5
415 The average number of bytes consumed by the instructions in the function.
416 This value is computed by dividing Instruction Size by Instructions.
417 .UNINDENT
418 .UNINDENT
419 .sp
420 \fBBytes Per Instruction\fP
421 .INDENT 0.0
422 .INDENT 3.5
423 The average number of bytes used by the function per instruction.  This value
424 is computed by dividing Byte Size by Instructions.  Note that this is not the
425 same as Average Instruction Size.  It computes a number relative to the total
426 function size not just the size of the instruction list.
427 .UNINDENT
428 .UNINDENT
429 .sp
430 \fBNumber of VBR 32\-bit Integers\fP
431 .INDENT 0.0
432 .INDENT 3.5
433 The total number of 32\-bit integers found in this function (for any use).
434 .UNINDENT
435 .UNINDENT
436 .sp
437 \fBNumber of VBR 64\-bit Integers\fP
438 .INDENT 0.0
439 .INDENT 3.5
440 The total number of 64\-bit integers found in this function (for any use).
441 .UNINDENT
442 .UNINDENT
443 .sp
444 \fBNumber of VBR Compressed Bytes\fP
445 .INDENT 0.0
446 .INDENT 3.5
447 The total number of bytes in this function consumed by the 32\-bit and 64\-bit
448 integers that use the Variable Bit Rate encoding scheme.
449 .UNINDENT
450 .UNINDENT
451 .sp
452 \fBNumber of VBR Expanded Bytes\fP
453 .INDENT 0.0
454 .INDENT 3.5
455 The total number of bytes in this function that would have been consumed by
456 the 32\-bit and 64\-bit integers had they not been compressed with the Variable
457 Bit Rate encoding scheme.
458 .UNINDENT
459 .UNINDENT
460 .sp
461 \fBBytes Saved With VBR\fP
462 .INDENT 0.0
463 .INDENT 3.5
464 The total number of bytes saved in this function by using the Variable Bit
465 Rate encoding scheme.  The percentage is relative to # of VBR Expanded Bytes.
466 .UNINDENT
467 .UNINDENT
468 .SH SEE ALSO
469 .sp
470 \fB/CommandGuide/llvm\-dis\fP, \fB/BitCodeFormat\fP
471 .SH AUTHOR
472 Maintained by The LLVM Team (http://llvm.org/).
473 .SH COPYRIGHT
474 2003-2013, LLVM Project
475 .\" Generated by docutils manpage writer.
476 .