1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>llvm-bcanalyzer - LLVM bitcode analyzer — LLVM 13 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="FileCheck - Flexible pattern matching file verifier" href="FileCheck.html" />
<link rel="prev" title="llvm-extract - extract a function from an LLVM module" href="llvm-extract.html" />
<style type="text/css">
table.right { float: right; margin-left: 20px; }
table.right td { border: 1px solid #ccc; }
</style>
</head><body>
<div class="logo">
<a href="../index.html">
<img src="../_static/logo.png"
alt="LLVM Logo" width="250" height="88"/></a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="FileCheck.html" title="FileCheck - Flexible pattern matching file verifier"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="llvm-extract.html" title="llvm-extract - extract a function from an LLVM module"
accesskey="P">previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-bcanalyzer - LLVM bitcode analyzer</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3>Documentation</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/GettingStartedTutorials.html">Getting Started/Tutorials</a></li>
<li><a href="https://llvm.org/docs/UserGuides.html">User Guides</a></li>
<li><a href="https://llvm.org/docs/Reference.html">Reference</a></li>
</ul>
<h3>Getting Involved</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/Contributing.html">Contributing to LLVM</a></li>
<li><a href="https://llvm.org/docs/HowToSubmitABug.html">Submitting Bug Reports</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#mailing-lists">Mailing Lists</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#irc">IRC</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#meetups-and-social-events">Meetups and Social Events</a></li>
</ul>
<h3>Additional Links</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/FAQ.html">FAQ</a></li>
<li><a href="https://llvm.org/docs/Lexicon.html">Glossary</a></li>
<li><a href="https://llvm.org/pubs">Publications</a></li>
<li><a href="https://github.com/llvm/llvm-project//">Github Repository</a></li>
</ul>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/CommandGuide/llvm-bcanalyzer.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="llvm-bcanalyzer-llvm-bitcode-analyzer">
<h1>llvm-bcanalyzer - LLVM bitcode analyzer<a class="headerlink" href="#llvm-bcanalyzer-llvm-bitcode-analyzer" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-bcanalyzer</strong> [<em>options</em>] [<em>filename</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <strong class="program">llvm-bcanalyzer</strong> command is a small utility for analyzing bitcode
files. The tool reads a bitcode file (such as generated with the
<strong class="program">llvm-as</strong> tool) and produces a statistical report on the contents of
the bitcode file. The tool can also dump a low level but human readable
version of the bitcode file. This tool is probably not of much interest or
utility except for those working directly with the bitcode file format. Most
LLVM users can just ignore this tool.</p>
<p>If <em>filename</em> is omitted or is <code class="docutils literal notranslate"><span class="pre">-</span></code>, then <strong class="program">llvm-bcanalyzer</strong> reads its
input from standard input. This is useful for combining the tool into a
pipeline. Output is written to the standard output.</p>
</div>
<div class="section" id="options">
<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-llvm-bcanalyzer-nodetails">
<code class="sig-name descname"><span class="pre">-nodetails</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-bcanalyzer-nodetails" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">llvm-bcanalyzer</strong> to abbreviate its output by writing out only
a module level summary. The details for individual functions are not
displayed.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-bcanalyzer-dump">
<code class="sig-name descname"><span class="pre">-dump</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-bcanalyzer-dump" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">llvm-bcanalyzer</strong> to dump the bitcode in a human readable
format. This format is significantly different from LLVM assembly and
provides details about the encoding of the bitcode file.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-bcanalyzer-verify">
<code class="sig-name descname"><span class="pre">-verify</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-bcanalyzer-verify" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">llvm-bcanalyzer</strong> to verify the module produced by reading the
bitcode. This ensures that the statistics generated are based on a consistent
module.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-bcanalyzer-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-bcanalyzer-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>
</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p>If <strong class="program">llvm-bcanalyzer</strong> succeeds, it will exit with 0. Otherwise, if an
error occurs, it will exit with a non-zero value, usually 1.</p>
</div>
<div class="section" id="summary-output-definitions">
<h2>SUMMARY OUTPUT DEFINITIONS<a class="headerlink" href="#summary-output-definitions" title="Permalink to this headline">¶</a></h2>
<p>The following items are always printed by llvm-bcanalyzer. They comprize the
summary output.</p>
<p><strong>Bitcode Analysis Of Module</strong></p>
<blockquote>
<div><p>This just provides the name of the module for which bitcode analysis is being
generated.</p>
</div></blockquote>
<p><strong>Bitcode Version Number</strong></p>
<blockquote>
<div><p>The bitcode version (not LLVM version) of the file read by the analyzer.</p>
</div></blockquote>
<p><strong>File Size</strong></p>
<blockquote>
<div><p>The size, in bytes, of the entire bitcode file.</p>
</div></blockquote>
<p><strong>Module Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of the module block. Percentage is relative to File Size.</p>
</div></blockquote>
<p><strong>Function Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of all the function blocks. Percentage is relative to File
Size.</p>
</div></blockquote>
<p><strong>Global Types Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of the Global Types Pool. Percentage is relative to File
Size. This is the size of the definitions of all types in the bitcode file.</p>
</div></blockquote>
<p><strong>Constant Pool Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of the Constant Pool Blocks Percentage is relative to File
Size.</p>
</div></blockquote>
<p><strong>Module Globals Bytes</strong></p>
<blockquote>
<div><p>Ths size, in bytes, of the Global Variable Definitions and their initializers.
Percentage is relative to File Size.</p>
</div></blockquote>
<p><strong>Instruction List Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of all the instruction lists in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.</p>
</div></blockquote>
<p><strong>Compaction Table Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of all the compaction tables in all the functions.
Percentage is relative to File Size. Note that this value is also included in
the Function Bytes.</p>
</div></blockquote>
<p><strong>Symbol Table Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of all the symbol tables in all the functions. Percentage is
relative to File Size. Note that this value is also included in the Function
Bytes.</p>
</div></blockquote>
<p><strong>Dependent Libraries Bytes</strong></p>
<blockquote>
<div><p>The size, in bytes, of the list of dependent libraries in the module. Percentage
is relative to File Size. Note that this value is also included in the Module
Global Bytes.</p>
</div></blockquote>
<p><strong>Number Of Bitcode Blocks</strong></p>
<blockquote>
<div><p>The total number of blocks of any kind in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Functions</strong></p>
<blockquote>
<div><p>The total number of function definitions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Types</strong></p>
<blockquote>
<div><p>The total number of types defined in the Global Types Pool.</p>
</div></blockquote>
<p><strong>Number Of Constants</strong></p>
<blockquote>
<div><p>The total number of constants (of any type) defined in the Constant Pool.</p>
</div></blockquote>
<p><strong>Number Of Basic Blocks</strong></p>
<blockquote>
<div><p>The total number of basic blocks defined in all functions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Instructions</strong></p>
<blockquote>
<div><p>The total number of instructions defined in all functions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Long Instructions</strong></p>
<blockquote>
<div><p>The total number of long instructions defined in all functions in the bitcode
file. Long instructions are those taking greater than 4 bytes. Typically long
instructions are GetElementPtr with several indices, PHI nodes, and calls to
functions with large numbers of arguments.</p>
</div></blockquote>
<p><strong>Number Of Operands</strong></p>
<blockquote>
<div><p>The total number of operands used in all instructions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Compaction Tables</strong></p>
<blockquote>
<div><p>The total number of compaction tables in all functions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Symbol Tables</strong></p>
<blockquote>
<div><p>The total number of symbol tables in all functions in the bitcode file.</p>
</div></blockquote>
<p><strong>Number Of Dependent Libs</strong></p>
<blockquote>
<div><p>The total number of dependent libraries found in the bitcode file.</p>
</div></blockquote>
<p><strong>Total Instruction Size</strong></p>
<blockquote>
<div><p>The total size of the instructions in all functions in the bitcode file.</p>
</div></blockquote>
<p><strong>Average Instruction Size</strong></p>
<blockquote>
<div><p>The average number of bytes per instruction across all functions in the bitcode
file. This value is computed by dividing Total Instruction Size by Number Of
Instructions.</p>
</div></blockquote>
<p><strong>Maximum Type Slot Number</strong></p>
<blockquote>
<div><p>The maximum value used for a type’s slot number. Larger slot number values take
more bytes to encode.</p>
</div></blockquote>
<p><strong>Maximum Value Slot Number</strong></p>
<blockquote>
<div><p>The maximum value used for a value’s slot number. Larger slot number values take
more bytes to encode.</p>
</div></blockquote>
<p><strong>Bytes Per Value</strong></p>
<blockquote>
<div><p>The average size of a Value definition (of any type). This is computed by
dividing File Size by the total number of values of any type.</p>
</div></blockquote>
<p><strong>Bytes Per Global</strong></p>
<blockquote>
<div><p>The average size of a global definition (constants and global variables).</p>
</div></blockquote>
<p><strong>Bytes Per Function</strong></p>
<blockquote>
<div><p>The average number of bytes per function definition. This is computed by
dividing Function Bytes by Number Of Functions.</p>
</div></blockquote>
<p><strong># of VBR 32-bit Integers</strong></p>
<blockquote>
<div><p>The total number of 32-bit integers encoded using the Variable Bit Rate
encoding scheme.</p>
</div></blockquote>
<p><strong># of VBR 64-bit Integers</strong></p>
<blockquote>
<div><p>The total number of 64-bit integers encoded using the Variable Bit Rate encoding
scheme.</p>
</div></blockquote>
<p><strong># of VBR Compressed Bytes</strong></p>
<blockquote>
<div><p>The total number of bytes consumed by the 32-bit and 64-bit integers that use
the Variable Bit Rate encoding scheme.</p>
</div></blockquote>
<p><strong># of VBR Expanded Bytes</strong></p>
<blockquote>
<div><p>The total number of bytes that would have been consumed by the 32-bit and 64-bit
integers had they not been compressed with the Variable Bit Rage encoding
scheme.</p>
</div></blockquote>
<p><strong>Bytes Saved With VBR</strong></p>
<blockquote>
<div><p>The total number of bytes saved by using the Variable Bit Rate encoding scheme.
The percentage is relative to # of VBR Expanded Bytes.</p>
</div></blockquote>
</div>
<div class="section" id="detailed-output-definitions">
<h2>DETAILED OUTPUT DEFINITIONS<a class="headerlink" href="#detailed-output-definitions" title="Permalink to this headline">¶</a></h2>
<p>The following definitions occur only if the -nodetails option was not given.
The detailed output provides additional information on a per-function basis.</p>
<p><strong>Type</strong></p>
<blockquote>
<div><p>The type signature of the function.</p>
</div></blockquote>
<p><strong>Byte Size</strong></p>
<blockquote>
<div><p>The total number of bytes in the function’s block.</p>
</div></blockquote>
<p><strong>Basic Blocks</strong></p>
<blockquote>
<div><p>The number of basic blocks defined by the function.</p>
</div></blockquote>
<p><strong>Instructions</strong></p>
<blockquote>
<div><p>The number of instructions defined by the function.</p>
</div></blockquote>
<p><strong>Long Instructions</strong></p>
<blockquote>
<div><p>The number of instructions using the long instruction format in the function.</p>
</div></blockquote>
<p><strong>Operands</strong></p>
<blockquote>
<div><p>The number of operands used by all instructions in the function.</p>
</div></blockquote>
<p><strong>Instruction Size</strong></p>
<blockquote>
<div><p>The number of bytes consumed by instructions in the function.</p>
</div></blockquote>
<p><strong>Average Instruction Size</strong></p>
<blockquote>
<div><p>The average number of bytes consumed by the instructions in the function.
This value is computed by dividing Instruction Size by Instructions.</p>
</div></blockquote>
<p><strong>Bytes Per Instruction</strong></p>
<blockquote>
<div><p>The average number of bytes used by the function per instruction. This value
is computed by dividing Byte Size by Instructions. Note that this is not the
same as Average Instruction Size. It computes a number relative to the total
function size not just the size of the instruction list.</p>
</div></blockquote>
<p><strong>Number of VBR 32-bit Integers</strong></p>
<blockquote>
<div><p>The total number of 32-bit integers found in this function (for any use).</p>
</div></blockquote>
<p><strong>Number of VBR 64-bit Integers</strong></p>
<blockquote>
<div><p>The total number of 64-bit integers found in this function (for any use).</p>
</div></blockquote>
<p><strong>Number of VBR Compressed Bytes</strong></p>
<blockquote>
<div><p>The total number of bytes in this function consumed by the 32-bit and 64-bit
integers that use the Variable Bit Rate encoding scheme.</p>
</div></blockquote>
<p><strong>Number of VBR Expanded Bytes</strong></p>
<blockquote>
<div><p>The total number of bytes in this function that would have been consumed by
the 32-bit and 64-bit integers had they not been compressed with the Variable
Bit Rate encoding scheme.</p>
</div></blockquote>
<p><strong>Bytes Saved With VBR</strong></p>
<blockquote>
<div><p>The total number of bytes saved in this function by using the Variable Bit
Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes.</p>
</div></blockquote>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p><em class="manpage"><a class="manpage reference external" href="https://llvm.org/docs/CommandGuide/llvm-dis.html">llvm-dis(1)</a></em>, <a class="reference internal" href="../BitCodeFormat.html"><span class="doc">LLVM Bitcode File Format</span></a></p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="FileCheck.html" title="FileCheck - Flexible pattern matching file verifier"
>next</a> |</li>
<li class="right" >
<a href="llvm-extract.html" title="llvm-extract - extract a function from an LLVM module"
>previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" >LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-bcanalyzer - LLVM bitcode analyzer</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2003-2021, LLVM Project.
Last updated on 2021-09-18.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.4.
</div>
</body>
</html>
|