1LLVM-BCANALYZER(1)            LLVM Command Guide            LLVM-BCANALYZER(1)
2
3
4

NAME

6       llvm-bcanalyzer - LLVM bitcode analyzer
7

SYNOPSIS

9       llvm-bcanalyzer [options] [filename]
10

DESCRIPTION

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 llvm-
14       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
17       interest or utility except for those working directly with the bitcode
18       file 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

OPTIONS

25       -nodetails
26           Causes llvm-bcanalyzer to abbreviate its output by writing out only
27           a module level summary. The details for individual functions are
28           not displayed.
29
30       -dump
31           Causes llvm-bcanalyzer to dump the bitcode in a human readable
32           format. This format is significantly different from LLVM assembly
33           and provides details about the encoding of the bitcode file.
34
35       -verify
36           Causes llvm-bcanalyzer to verify the module produced by reading the
37           bitcode. This ensures that the statistics generated are based on a
38           consistent module.
39
40       -help
41           Print a summary of command line options.
42

EXIT STATUS

44       If llvm-bcanalyzer succeeds, it will exit with 0.  Otherwise, if an
45       error occurs, it will exit with a non-zero value, usually 1.
46

SUMMARY OUTPUT DEFINITIONS

48       The following items are always printed by llvm-bcanalyzer. They
49       comprize the summary output.
50
51       Bitcode Analysis Of Module
52           This just provides the name of the module for which bitcode
53           analysis is being generated.
54
55       Bitcode Version Number
56           The bitcode version (not LLVM version) of the file read by the
57           analyzer.
58
59       File Size
60           The size, in bytes, of the entire bitcode file.
61
62       Module Bytes
63           The size, in bytes, of the module block. Percentage is relative to
64           File Size.
65
66       Function Bytes
67           The size, in bytes, of all the function blocks. Percentage is
68           relative to File Size.
69
70       Global Types Bytes
71           The size, in bytes, of the Global Types Pool. Percentage is
72           relative to File Size. This is the size of the definitions of all
73           types in the bitcode file.
74
75       Constant Pool Bytes
76           The size, in bytes, of the Constant Pool Blocks Percentage is
77           relative to File Size.
78
79       Module Globals Bytes
80           Ths size, in bytes, of the Global Variable Definitions and their
81           initializers.  Percentage is relative to File Size.
82
83       Instruction List Bytes
84           The size, in bytes, of all the instruction lists in all the
85           functions.  Percentage is relative to File Size. Note that this
86           value is also included in the Function Bytes.
87
88       Compaction Table Bytes
89           The size, in bytes, of all the compaction tables in all the
90           functions.  Percentage is relative to File Size. Note that this
91           value is also included in the Function Bytes.
92
93       Symbol Table Bytes
94           The size, in bytes, of all the symbol tables in all the functions.
95           Percentage is relative to File Size. Note that this value is also
96           included in the Function Bytes.
97
98       Dependent Libraries Bytes
99           The size, in bytes, of the list of dependent libraries in the
100           module. Percentage is relative to File Size. Note that this value
101           is also included in the Module Global Bytes.
102
103       Number Of Bitcode Blocks
104           The total number of blocks of any kind in the bitcode file.
105
106       Number Of Functions
107           The total number of function definitions in the bitcode file.
108
109       Number Of Types
110           The total number of types defined in the Global Types Pool.
111
112       Number Of Constants
113           The total number of constants (of any type) defined in the Constant
114           Pool.
115
116       Number Of Basic Blocks
117           The total number of basic blocks defined in all functions in the
118           bitcode file.
119
120       Number Of Instructions
121           The total number of instructions defined in all functions in the
122           bitcode file.
123
124       Number Of Long Instructions
125           The total number of long instructions defined in all functions in
126           the bitcode file. Long instructions are those taking greater than 4
127           bytes. Typically long instructions are GetElementPtr with several
128           indices, PHI nodes, and calls to functions with large numbers of
129           arguments.
130
131       Number Of Operands
132           The total number of operands used in all instructions in the
133           bitcode file.
134
135       Number Of Compaction Tables
136           The total number of compaction tables in all functions in the
137           bitcode file.
138
139       Number Of Symbol Tables
140           The total number of symbol tables in all functions in the bitcode
141           file.
142
143       Number Of Dependent Libs
144           The total number of dependent libraries found in the bitcode file.
145
146       Total Instruction Size
147           The total size of the instructions in all functions in the bitcode
148           file.
149
150       Average Instruction Size
151           The average number of bytes per instruction across all functions in
152           the bitcode file. This value is computed by dividing Total
153           Instruction Size by Number Of Instructions.
154
155       Maximum Type Slot Number
156           The maximum value used for a type's slot number. Larger slot number
157           values take more bytes to encode.
158
159       Maximum Value Slot Number
160           The maximum value used for a value's slot number. Larger slot
161           number values take more bytes to encode.
162
163       Bytes Per Value
164           The average size of a Value definition (of any type). This is
165           computed by dividing File Size by the total number of values of any
166           type.
167
168       Bytes Per Global
169           The average size of a global definition (constants and global
170           variables).
171
172       Bytes Per Function
173           The average number of bytes per function definition. This is
174           computed by dividing Function Bytes by Number Of Functions.
175
176       # of VBR 32-bit Integers
177           The total number of 32-bit integers encoded using the Variable Bit
178           Rate encoding scheme.
179
180       # of VBR 64-bit Integers
181           The total number of 64-bit integers encoded using the Variable Bit
182           Rate encoding scheme.
183
184       # of VBR Compressed Bytes
185           The total number of bytes consumed by the 32-bit and 64-bit
186           integers that use the Variable Bit Rate encoding scheme.
187
188       # of VBR Expanded Bytes
189           The total number of bytes that would have been consumed by the
190           32-bit and 64-bit integers had they not been compressed with the
191           Variable Bit Rage encoding scheme.
192
193       Bytes Saved With VBR
194           The total number of bytes saved by using the Variable Bit Rate
195           encoding scheme.  The percentage is relative to # of VBR Expanded
196           Bytes.
197

DETAILED OUTPUT DEFINITIONS

199       The following definitions occur only if the -nodetails option was not
200       given.  The detailed output provides additional information on a per-
201       function basis.
202
203       Type
204           The type signature of the function.
205
206       Byte Size
207           The total number of bytes in the function's block.
208
209       Basic Blocks
210           The number of basic blocks defined by the function.
211
212       Instructions
213           The number of instructions defined by the function.
214
215       Long Instructions
216           The number of instructions using the long instruction format in the
217           function.
218
219       Operands
220           The number of operands used by all instructions in the function.
221
222       Instruction Size
223           The number of bytes consumed by instructions in the function.
224
225       Average Instruction Size
226           The average number of bytes consumed by the instructions in the
227           funtion. This value is computed by dividing Instruction Size by
228           Instructions.
229
230       Bytes Per Instruction
231           The average number of bytes used by the function per instruction.
232           This value is computed by dividing Byte Size by Instructions. Note
233           that this is not the same as Average Instruction Size. It computes
234           a number relative to the total function size not just the size of
235           the instruction list.
236
237       Number of VBR 32-bit Integers
238           The total number of 32-bit integers found in this function (for any
239           use).
240
241       Number of VBR 64-bit Integers
242           The total number of 64-bit integers found in this function (for any
243           use).
244
245       Number of VBR Compressed Bytes
246           The total number of bytes in this function consumed by the 32-bit
247           and 64-bit integers that use the Variable Bit Rate encoding scheme.
248
249       Number of VBR Expanded Bytes
250           The total number of bytes in this function that would have been
251           consumed by the 32-bit and 64-bit integers had they not been
252           compressed with the Variable Bit Rate encoding scheme.
253
254       Bytes Saved With VBR
255           The total number of bytes saved in this function by using the
256           Variable Bit Rate encoding scheme. The percentage is relative to #
257           of VBR Expanded Bytes.
258

SEE ALSO

260       llvm-dis, <http://llvm.org/docs/BitCodeFormat.html>
261

AUTHORS

263       Maintained by the LLVM Team (<http://llvm.org>).
264
265
266
267CVS                               2010-05-07                LLVM-BCANALYZER(1)
Impressum