blob: ff61808f2b2ac7d35bedf70db3c7229044019271 [file] [log] [blame]
John Criswell408128d2003-09-11 19:58:03 +00001<html>
2<title>
Chris Lattner29793072003-09-25 19:50:05 +00003LLVM: analyze tool
John Criswell408128d2003-09-11 19:58:03 +00004</title>
5
Chris Lattner7c2b1262003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswell408128d2003-09-11 19:58:03 +00007
Chris Lattnerd49ee882003-10-07 20:36:00 +00008<center><h1>LLVM: <tt>analyze</tt> tool</h1></center>
John Criswell408128d2003-09-11 19:58:03 +00009<HR>
10
Chris Lattnerd49ee882003-10-07 20:36:00 +000011<h3>NAME</h3>
12<tt>analyze</tt>
John Criswell408128d2003-09-11 19:58:03 +000013
Chris Lattnerd49ee882003-10-07 20:36:00 +000014<h3>SYNOPSIS</h3>
15<tt>analyze [options] [filename]</tt>
John Criswell408128d2003-09-11 19:58:03 +000016
Chris Lattnerd49ee882003-10-07 20:36:00 +000017<h3>DESCRIPTION</h3>
John Criswell408128d2003-09-11 19:58:03 +000018
Chris Lattnerd49ee882003-10-07 20:36:00 +000019The <tt>analyze</tt> command performs various analysis of LLVM assembly code or
John Criswell1cab4fb2003-09-29 14:05:08 +000020bytecode. It will usually print the results on standard output, but in a few
21cases, it will print output to standard error or generate a file with the
22analysis output (which is usually done when the output is meant for another
23program).
24<p>
Chris Lattnerd49ee882003-10-07 20:36:00 +000025If filename is omitted or is -, <tt>analyze</tt> reads its input from standard
26input. It first attempts to interpret its input as LLVM bytecode. If it
27encounters an error, it then attempts to parse the input as LLVM assembly
28language.
29
30<h3>OPTIONS</h3>
John Criswell408128d2003-09-11 19:58:03 +000031
32<ul>
33 <li> -help
34 <br>
35 Print a summary of command line options.
36 <p>
37
John Criswell408128d2003-09-11 19:58:03 +000038 <li> -q
39 <br>
40 Quiet mode. With this option, analysis pass names are not printed.
41 <p>
42
John Criswell2edea842004-01-26 21:26:54 +000043 <li> -load &lt;plugin&gt;
John Criswell408128d2003-09-11 19:58:03 +000044 <br>
John Criswell2edea842004-01-26 21:26:54 +000045 Load the specified dynamic object with name <tt>plugin</tt>. This file
John Criswell408128d2003-09-11 19:58:03 +000046 should contain additional analysis passes that register themselves with
Chris Lattnerd49ee882003-10-07 20:36:00 +000047 the <tt>analyze</tt> program after being loaded.
John Criswell408128d2003-09-11 19:58:03 +000048 <p>
Chris Lattnerd49ee882003-10-07 20:36:00 +000049
John Criswell408128d2003-09-11 19:58:03 +000050 After being loaded, additional command line options are made available
John Criswell2edea842004-01-26 21:26:54 +000051 for running the passes made available by <tt>plugin</tt>. Use
52 '<tt><tt>analyze</tt> -load &lt;plugin&gt; -help</tt>' to see the new
Chris Lattnerd49ee882003-10-07 20:36:00 +000053 list of available analysis passes.
John Criswell408128d2003-09-11 19:58:03 +000054 <p>
John Criswell13875932004-03-12 22:45:35 +000055
John Criswell13875932004-03-12 22:45:35 +000056 <li> -profile-info-file &lt;filename&gt;
57 <br>
58 Specify the name of the file loaded by the -profile-loader option.
59 <p>
60
61 <li> -stats
62 <br>
63 Print statistics.
64 <p>
65
66 <li> -time-passes
67 <br>
68 Record the amount of time needed for each pass and print it to standard
69 error.
70 <p>
John Criswell408128d2003-09-11 19:58:03 +000071</ul>
72
Chris Lattnerd49ee882003-10-07 20:36:00 +000073<h3>EXIT STATUS</h3>
John Criswell408128d2003-09-11 19:58:03 +000074
Chris Lattnerd49ee882003-10-07 20:36:00 +000075If <tt>analyze</tt> succeeds, it will exit with 0. Otherwise, if an error
76occurs, it will exit with a non-zero value.
John Criswell408128d2003-09-11 19:58:03 +000077
Chris Lattnerd49ee882003-10-07 20:36:00 +000078<h3>SEE ALSO</h3>
79
80<a href="opt.html"><tt>opt</tt></a>
John Criswell408128d2003-09-11 19:58:03 +000081
82<HR>
Chris Lattner7c2b1262003-10-07 20:12:05 +000083Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswell408128d2003-09-11 19:58:03 +000084</body>
85</html>
86