]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
MFC r234353:
[FreeBSD/stable/9.git] / usr.bin / clang / llvm-bcanalyzer / llvm-bcanalyzer.1
1 .\" $FreeBSD$
2 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" Set up some character translations and predefined strings.  \*(-- will
20 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
21 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
22 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
23 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
24 .\" nothing in troff, for use with C<>.
25 .tr \(*W-
26 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
27 .ie n \{\
28 .    ds -- \(*W-
29 .    ds PI pi
30 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
31 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
32 .    ds L" ""
33 .    ds R" ""
34 .    ds C` ""
35 .    ds C' ""
36 'br\}
37 .el\{\
38 .    ds -- \|\(em\|
39 .    ds PI \(*p
40 .    ds L" ``
41 .    ds R" ''
42 'br\}
43 .\"
44 .\" Escape single quotes in literal strings from groff's Unicode transform.
45 .ie \n(.g .ds Aq \(aq
46 .el       .ds Aq '
47 .\"
48 .\" If the F register is turned on, we'll generate index entries on stderr for
49 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
50 .\" entries marked with X<> in POD.  Of course, you'll have to process the
51 .\" output yourself in some meaningful fashion.
52 .ie \nF \{\
53 .    de IX
54 .    tm Index:\\$1\t\\n%\t"\\$2"
55 ..
56 .    nr % 0
57 .    rr F
58 .\}
59 .el \{\
60 .    de IX
61 ..
62 .\}
63 .\"
64 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
65 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
66 .    \" fudge factors for nroff and troff
67 .if n \{\
68 .    ds #H 0
69 .    ds #V .8m
70 .    ds #F .3m
71 .    ds #[ \f1
72 .    ds #] \fP
73 .\}
74 .if t \{\
75 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
76 .    ds #V .6m
77 .    ds #F 0
78 .    ds #[ \&
79 .    ds #] \&
80 .\}
81 .    \" simple accents for nroff and troff
82 .if n \{\
83 .    ds ' \&
84 .    ds ` \&
85 .    ds ^ \&
86 .    ds , \&
87 .    ds ~ ~
88 .    ds /
89 .\}
90 .if t \{\
91 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
92 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
93 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
94 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
95 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
96 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
97 .\}
98 .    \" troff and (daisy-wheel) nroff accents
99 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
100 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
101 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
102 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
103 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
104 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
105 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
106 .ds ae a\h'-(\w'a'u*4/10)'e
107 .ds Ae A\h'-(\w'A'u*4/10)'E
108 .    \" corrections for vroff
109 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
110 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
111 .    \" for low resolution devices (crt and lpr)
112 .if \n(.H>23 .if \n(.V>19 \
113 \{\
114 .    ds : e
115 .    ds 8 ss
116 .    ds o a
117 .    ds d- d\h'-1'\(ga
118 .    ds D- D\h'-1'\(hy
119 .    ds th \o'bp'
120 .    ds Th \o'LP'
121 .    ds ae ae
122 .    ds Ae AE
123 .\}
124 .rm #[ #] #H #V #F C
125 .\" ========================================================================
126 .\"
127 .IX Title "LLVM-BCANALYZER 1"
128 .TH LLVM-BCANALYZER 1 "2012-04-05" "LLVM 3.1" "LLVM Command Guide"
129 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
130 .\" way too many mistakes in technical documents.
131 .if n .ad l
132 .nh
133 .SH "NAME"
134 llvm\-bcanalyzer \- LLVM bitcode analyzer
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 \&\fBllvm-bcanalyzer\fR [\fIoptions\fR] [\fIfilename\fR]
138 .SH "DESCRIPTION"
139 .IX Header "DESCRIPTION"
140 The \fBllvm-bcanalyzer\fR command is a small utility for analyzing bitcode files.
141 The tool reads a bitcode file (such as generated with the \fBllvm-as\fR tool) and
142 produces a statistical report on the contents of the bitcode file.  The tool
143 can also dump a low level but human readable version of the bitcode file. 
144 This tool is probably not of much interest or utility except for those working 
145 directly with the bitcode file format. Most \s-1LLVM\s0 users can just ignore
146 this tool.
147 .PP
148 If \fIfilename\fR is omitted or is \f(CW\*(C`\-\*(C'\fR, then \fBllvm-bcanalyzer\fR reads its input 
149 from standard input. This is useful for combining the tool into a pipeline.
150 Output is written to the standard output.
151 .SH "OPTIONS"
152 .IX Header "OPTIONS"
153 .IP "\fB\-nodetails\fR" 4
154 .IX Item "-nodetails"
155 Causes \fBllvm-bcanalyzer\fR to abbreviate its output by writing out only a module 
156 level summary. The details for individual functions are not displayed.
157 .IP "\fB\-dump\fR" 4
158 .IX Item "-dump"
159 Causes \fBllvm-bcanalyzer\fR to dump the bitcode in a human readable format. This 
160 format is significantly different from \s-1LLVM\s0 assembly and provides details about 
161 the encoding of the bitcode file.
162 .IP "\fB\-verify\fR" 4
163 .IX Item "-verify"
164 Causes \fBllvm-bcanalyzer\fR to verify the module produced by reading the 
165 bitcode. This ensures that the statistics generated are based on a consistent
166 module.
167 .IP "\fB\-help\fR" 4
168 .IX Item "-help"
169 Print a summary of command line options.
170 .SH "EXIT STATUS"
171 .IX Header "EXIT STATUS"
172 If \fBllvm-bcanalyzer\fR succeeds, it will exit with 0.  Otherwise, if an error
173 occurs, it will exit with a non-zero value, usually 1.
174 .SH "SUMMARY OUTPUT DEFINITIONS"
175 .IX Header "SUMMARY OUTPUT DEFINITIONS"
176 The following items are always printed by llvm-bcanalyzer. They comprize the
177 summary output.
178 .IP "\fBBitcode Analysis Of Module\fR" 4
179 .IX Item "Bitcode Analysis Of Module"
180 This just provides the name of the module for which bitcode analysis is being
181 generated.
182 .IP "\fBBitcode Version Number\fR" 4
183 .IX Item "Bitcode Version Number"
184 The bitcode version (not \s-1LLVM\s0 version) of the file read by the analyzer.
185 .IP "\fBFile Size\fR" 4
186 .IX Item "File Size"
187 The size, in bytes, of the entire bitcode file.
188 .IP "\fBModule Bytes\fR" 4
189 .IX Item "Module Bytes"
190 The size, in bytes, of the module block. Percentage is relative to File Size.
191 .IP "\fBFunction Bytes\fR" 4
192 .IX Item "Function Bytes"
193 The size, in bytes, of all the function blocks. Percentage is relative to File
194 Size.
195 .IP "\fBGlobal Types Bytes\fR" 4
196 .IX Item "Global Types Bytes"
197 The size, in bytes, of the Global Types Pool. Percentage is relative to File
198 Size. This is the size of the definitions of all types in the bitcode file.
199 .IP "\fBConstant Pool Bytes\fR" 4
200 .IX Item "Constant Pool Bytes"
201 The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
202 Size.
203 .IP "\fBModule Globals Bytes\fR" 4
204 .IX Item "Module Globals Bytes"
205 Ths size, in bytes, of the Global Variable Definitions and their initializers.
206 Percentage is relative to File Size.
207 .IP "\fBInstruction List Bytes\fR" 4
208 .IX Item "Instruction List Bytes"
209 The size, in bytes, of all the instruction lists in all the functions.
210 Percentage is relative to File Size. Note that this value is also included in
211 the Function Bytes.
212 .IP "\fBCompaction Table Bytes\fR" 4
213 .IX Item "Compaction Table Bytes"
214 The size, in bytes, of all the compaction tables in all the functions.
215 Percentage is relative to File Size. Note that this value is also included in
216 the Function Bytes.
217 .IP "\fBSymbol Table Bytes\fR" 4
218 .IX Item "Symbol Table Bytes"
219 The size, in bytes, of all the symbol tables in all the functions. Percentage is
220 relative to File Size. Note that this value is also included in the Function
221 Bytes.
222 .IP "\fBDependent Libraries Bytes\fR" 4
223 .IX Item "Dependent Libraries Bytes"
224 The size, in bytes, of the list of dependent libraries in the module. Percentage
225 is relative to File Size. Note that this value is also included in the Module
226 Global Bytes.
227 .IP "\fBNumber Of Bitcode Blocks\fR" 4
228 .IX Item "Number Of Bitcode Blocks"
229 The total number of blocks of any kind in the bitcode file.
230 .IP "\fBNumber Of Functions\fR" 4
231 .IX Item "Number Of Functions"
232 The total number of function definitions in the bitcode file.
233 .IP "\fBNumber Of Types\fR" 4
234 .IX Item "Number Of Types"
235 The total number of types defined in the Global Types Pool.
236 .IP "\fBNumber Of Constants\fR" 4
237 .IX Item "Number Of Constants"
238 The total number of constants (of any type) defined in the Constant Pool.
239 .IP "\fBNumber Of Basic Blocks\fR" 4
240 .IX Item "Number Of Basic Blocks"
241 The total number of basic blocks defined in all functions in the bitcode file.
242 .IP "\fBNumber Of Instructions\fR" 4
243 .IX Item "Number Of Instructions"
244 The total number of instructions defined in all functions in the bitcode file.
245 .IP "\fBNumber Of Long Instructions\fR" 4
246 .IX Item "Number Of Long Instructions"
247 The total number of long instructions defined in all functions in the bitcode
248 file. Long instructions are those taking greater than 4 bytes. Typically long
249 instructions are GetElementPtr with several indices, \s-1PHI\s0 nodes, and calls to
250 functions with large numbers of arguments.
251 .IP "\fBNumber Of Operands\fR" 4
252 .IX Item "Number Of Operands"
253 The total number of operands used in all instructions in the bitcode file.
254 .IP "\fBNumber Of Compaction Tables\fR" 4
255 .IX Item "Number Of Compaction Tables"
256 The total number of compaction tables in all functions in the bitcode file.
257 .IP "\fBNumber Of Symbol Tables\fR" 4
258 .IX Item "Number Of Symbol Tables"
259 The total number of symbol tables in all functions in the bitcode file.
260 .IP "\fBNumber Of Dependent Libs\fR" 4
261 .IX Item "Number Of Dependent Libs"
262 The total number of dependent libraries found in the bitcode file.
263 .IP "\fBTotal Instruction Size\fR" 4
264 .IX Item "Total Instruction Size"
265 The total size of the instructions in all functions in the bitcode file.
266 .IP "\fBAverage Instruction Size\fR" 4
267 .IX Item "Average Instruction Size"
268 The average number of bytes per instruction across all functions in the bitcode
269 file. This value is computed by dividing Total Instruction Size by Number Of
270 Instructions.
271 .IP "\fBMaximum Type Slot Number\fR" 4
272 .IX Item "Maximum Type Slot Number"
273 The maximum value used for a type's slot number. Larger slot number values take 
274 more bytes to encode.
275 .IP "\fBMaximum Value Slot Number\fR" 4
276 .IX Item "Maximum Value Slot Number"
277 The maximum value used for a value's slot number. Larger slot number values take 
278 more bytes to encode.
279 .IP "\fBBytes Per Value\fR" 4
280 .IX Item "Bytes Per Value"
281 The average size of a Value definition (of any type). This is computed by
282 dividing File Size by the total number of values of any type.
283 .IP "\fBBytes Per Global\fR" 4
284 .IX Item "Bytes Per Global"
285 The average size of a global definition (constants and global variables).
286 .IP "\fBBytes Per Function\fR" 4
287 .IX Item "Bytes Per Function"
288 The average number of bytes per function definition. This is computed by
289 dividing Function Bytes by Number Of Functions.
290 .IP "\fB# of \s-1VBR\s0 32\-bit Integers\fR" 4
291 .IX Item "# of VBR 32-bit Integers"
292 The total number of 32\-bit integers encoded using the Variable Bit Rate
293 encoding scheme.
294 .IP "\fB# of \s-1VBR\s0 64\-bit Integers\fR" 4
295 .IX Item "# of VBR 64-bit Integers"
296 The total number of 64\-bit integers encoded using the Variable Bit Rate encoding
297 scheme.
298 .IP "\fB# of \s-1VBR\s0 Compressed Bytes\fR" 4
299 .IX Item "# of VBR Compressed Bytes"
300 The total number of bytes consumed by the 32\-bit and 64\-bit integers that use
301 the Variable Bit Rate encoding scheme.
302 .IP "\fB# of \s-1VBR\s0 Expanded Bytes\fR" 4
303 .IX Item "# of VBR Expanded Bytes"
304 The total number of bytes that would have been consumed by the 32\-bit and 64\-bit
305 integers had they not been compressed with the Variable Bit Rage encoding
306 scheme.
307 .IP "\fBBytes Saved With \s-1VBR\s0\fR" 4
308 .IX Item "Bytes Saved With VBR"
309 The total number of bytes saved by using the Variable Bit Rate encoding scheme.
310 The percentage is relative to # of \s-1VBR\s0 Expanded Bytes.
311 .SH "DETAILED OUTPUT DEFINITIONS"
312 .IX Header "DETAILED OUTPUT DEFINITIONS"
313 The following definitions occur only if the \-nodetails option was not given.
314 The detailed output provides additional information on a per-function basis.
315 .IP "\fBType\fR" 4
316 .IX Item "Type"
317 The type signature of the function.
318 .IP "\fBByte Size\fR" 4
319 .IX Item "Byte Size"
320 The total number of bytes in the function's block.
321 .IP "\fBBasic Blocks\fR" 4
322 .IX Item "Basic Blocks"
323 The number of basic blocks defined by the function.
324 .IP "\fBInstructions\fR" 4
325 .IX Item "Instructions"
326 The number of instructions defined by the function.
327 .IP "\fBLong Instructions\fR" 4
328 .IX Item "Long Instructions"
329 The number of instructions using the long instruction format in the function.
330 .IP "\fBOperands\fR" 4
331 .IX Item "Operands"
332 The number of operands used by all instructions in the function.
333 .IP "\fBInstruction Size\fR" 4
334 .IX Item "Instruction Size"
335 The number of bytes consumed by instructions in the function.
336 .IP "\fBAverage Instruction Size\fR" 4
337 .IX Item "Average Instruction Size"
338 The average number of bytes consumed by the instructions in the function. This
339 value is computed by dividing Instruction Size by Instructions.
340 .IP "\fBBytes Per Instruction\fR" 4
341 .IX Item "Bytes Per Instruction"
342 The average number of bytes used by the function per instruction. This value is
343 computed by dividing Byte Size by Instructions. Note that this is not the same
344 as Average Instruction Size. It computes a number relative to the total function
345 size not just the size of the instruction list.
346 .IP "\fBNumber of \s-1VBR\s0 32\-bit Integers\fR" 4
347 .IX Item "Number of VBR 32-bit Integers"
348 The total number of 32\-bit integers found in this function (for any use).
349 .IP "\fBNumber of \s-1VBR\s0 64\-bit Integers\fR" 4
350 .IX Item "Number of VBR 64-bit Integers"
351 The total number of 64\-bit integers found in this function (for any use).
352 .IP "\fBNumber of \s-1VBR\s0 Compressed Bytes\fR" 4
353 .IX Item "Number of VBR Compressed Bytes"
354 The total number of bytes in this function consumed by the 32\-bit and 64\-bit 
355 integers that use the Variable Bit Rate encoding scheme.
356 .IP "\fBNumber of \s-1VBR\s0 Expanded Bytes\fR" 4
357 .IX Item "Number of VBR Expanded Bytes"
358 The total number of bytes in this function that would have been consumed by 
359 the 32\-bit and 64\-bit integers had they not been compressed with the Variable 
360 Bit Rate encoding scheme.
361 .IP "\fBBytes Saved With \s-1VBR\s0\fR" 4
362 .IX Item "Bytes Saved With VBR"
363 The total number of bytes saved in this function by using the Variable Bit 
364 Rate encoding scheme. The percentage is relative to # of \s-1VBR\s0 Expanded Bytes.
365 .SH "SEE ALSO"
366 .IX Header "SEE ALSO"
367 llvm-dis, <http://llvm.org/docs/BitCodeFormat.html>
368 .SH "AUTHORS"
369 .IX Header "AUTHORS"
370 Maintained by the \s-1LLVM\s0 Team (<http://llvm.org/>).