John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <title> |
Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 3 | LLVM: extract tool |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 4 | </title> |
| 5 | |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 6 | <body bgcolor=white> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 7 | |
| 8 | <center> |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 9 | <h1>LLVM: <tt>extract</tt> tool</h1> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 10 | </center> |
| 11 | <HR> |
| 12 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 13 | <h3>NAME</h3> |
| 14 | <tt>extract</tt> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 15 | |
| 16 | <h3> |
| 17 | SYNOPSIS |
| 18 | </h3> |
| 19 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 20 | <tt>extract [options] [filename]</tt> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 21 | <h3> |
| 22 | DESCRIPTION |
| 23 | </h3> |
| 24 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 25 | The <tt>extract</tt> command takes the name of a function and extracts it from |
| 26 | the specified LLVM bytecode file. It is primarily used as a debugging tool to |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 27 | reduce test cases from larger programs that are triggering a bug. |
John Criswell | ac41ea2 | 2003-09-30 22:55:44 +0000 | [diff] [blame] | 28 | <p> |
| 29 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 30 | In addition to extracting the bytecode of the specified function, |
| 31 | <tt>extract</tt> will also remove unreachable global variables, prototypes, and |
| 32 | unused types. |
John Criswell | ac41ea2 | 2003-09-30 22:55:44 +0000 | [diff] [blame] | 33 | <p> |
| 34 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 35 | The <tt>extract</tt> command reads its input from standard input if filename is |
John Criswell | ac41ea2 | 2003-09-30 22:55:44 +0000 | [diff] [blame] | 36 | omitted or if filename is -. The output is always written to standard output. |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 37 | |
Chris Lattner | a972dad | 2004-02-18 16:55:29 +0000 | [diff] [blame] | 38 | <h3>OPTIONS</h3> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 39 | |
| 40 | <ul> |
Chris Lattner | a972dad | 2004-02-18 16:55:29 +0000 | [diff] [blame] | 41 | <ul> |
| 42 | <li> -f |
| 43 | <br> |
| 44 | Force overwrite. Normally, <tt>extract</tt> will refuse to overwrite an |
| 45 | output file that already exists. With this option, <tt>extract</tt> |
| 46 | will overwrite the output file and replace it with new bytecode. |
| 47 | <p> |
| 48 | |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 49 | <li>-func <function> |
| 50 | <br> |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 51 | Extract the specified function from the LLVM bytecode. |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 52 | <p> |
| 53 | |
| 54 | <li> -help |
| 55 | <br> |
| 56 | Print a summary of command line options. |
| 57 | <p> |
Chris Lattner | a972dad | 2004-02-18 16:55:29 +0000 | [diff] [blame] | 58 | |
| 59 | <li> -o <filename> |
| 60 | <br> |
| 61 | Specify the output filename. If filename is "-" (the default), then |
| 62 | <tt>extract</tt> sends its output to standard output. |
| 63 | <p> |
John Criswell | 8417142 | 2004-03-12 22:45:35 +0000 | [diff] [blame] | 64 | |
| 65 | <li> -stats |
| 66 | <br> |
| 67 | Print statistics. |
| 68 | <p> |
| 69 | |
| 70 | <li> -time-passes |
| 71 | <br> |
| 72 | Record the amount of time needed for each pass and print it to standard |
| 73 | error. |
| 74 | <p> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 75 | </ul> |
| 76 | |
| 77 | <h3> |
| 78 | EXIT STATUS |
| 79 | </h3> |
| 80 | |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 81 | If <tt>extract</tt> succeeds, it will exit with 0. Otherwise, if an error |
| 82 | occurs, it will exit with a non-zero value. |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 83 | |
| 84 | <h3> |
| 85 | SEE ALSO |
| 86 | </h3> |
Chris Lattner | f8cf416 | 2003-10-07 19:48:25 +0000 | [diff] [blame] | 87 | <a href="bugpoint.html"><tt>bugpoint</tt></a> |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 88 | |
| 89 | <HR> |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 90 | Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>. |
John Criswell | 58ebcd0 | 2003-09-17 14:11:24 +0000 | [diff] [blame] | 91 | </body> |
| 92 | </html> |
| 93 | |