+ <tbody>
+ <tr>
+ <th>Name</th>
+ <th>Value Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ </tr>
+ <tr><td colspan="4"><h4>LLVMC ITEMS</h4></td></tr>
+ <tr>
+ <td><b>version</b></td>
+ <td>string</td>
+ <td class="td_left">Provides the version string for the contents of this
+ configuration file. What is accepted as a legal configuration file
+ will change over time and this item tells <tt>llvmc</tt> which version
+ should be expected.</td>
+ <td><i>b</i></td>
+ </tr>
+ <tr><td colspan="4"><h4>LANG ITEMS</h4></td></tr>
+ <tr>
+ <td><b>lang.name</b></td>
+ <td>string</td>
+ <td class="td_left">Provides the common name for a language definition.
+ For example "C++", "Pascal", "FORTRAN", etc.</td>
+ <td><i>blank</i></td>
+ </tr>
+ <tr>
+ <td><b>lang.opt1</b></td>
+ <td>string</td>
+ <td class="td_left">Specifies the parameters to give the optimizer when
+ <tt>-O1</tt> is specified on the <tt>llvmc</tt> command line.</td>
+ <td><tt>-simplifycfg -instcombine -mem2reg</tt></td>
+ </tr>
+ <tr>
+ <td><b>lang.opt2</b></td>
+ <td>string</td>
+ <td class="td_left">Specifies the parameters to give the optimizer when
+ <tt>-O2</tt> is specified on the <tt>llvmc</tt> command line.</td>
+ <td><i>TBD</i></td>
+ </tr>
+ <tr>
+ <td><b>lang.opt3</b></td>
+ <td>string</td>
+ <td class="td_left">Specifies the parameters to give the optimizer when
+ <tt>-O3</tt> is specified on the <tt>llvmc</tt> command line.</td>
+ <td><i>TBD</i></td>
+ </tr>
+ <tr>
+ <td><b>lang.opt4</b></td>
+ <td>string</td>
+ <td class="td_left">Specifies the parameters to give the optimizer when
+ <tt>-O4</tt> is specified on the <tt>llvmc</tt> command line.</td>
+ <td><i>TBD</i></td>
+ </tr>
+ <tr>
+ <td><b>lang.opt5</b></td>
+ <td>string</td>
+ <td class="td_left">Specifies the parameters to give the optimizer when
+ <tt>-O5</tt> is specified on the <tt>llvmc</tt> command line.</td>
+ <td><i>TBD</i></td>
+ </tr>
+ <tr><td colspan="4"><h4>PREPROCESSOR ITEMS</h4></td></tr>
+ <tr>
+ <td><b>preprocessor.command</b></td>
+ <td>command</td>
+ <td class="td_left">This provides the command prototype that will be used
+ to run the preprocessor. This is generally only used with the
+ <tt>-E</tt> option.</td>
+ <td><blank></td>
+ </tr>
+ <tr>
+ <td><b>preprocessor.required</b></td>
+ <td>boolean</td>
+ <td class="td_left">This item specifies whether the pre-processing phase
+ is required by the language. If the value is true, then the
+ <tt>preprocessor.command</tt> value must not be blank. With this option,
+ <tt>llvmc</tt> will always run the preprocessor as it assumes that the
+ translation and optimization phases don't know how to pre-process their
+ input.</td>
+ <td>false</td>
+ </tr>
+ <tr><td colspan="4"><h4>TRANSLATOR ITEMS</h4></td></tr>
+ <tr>
+ <td><b>translator.command</b></td>
+ <td>command</td>
+ <td class="td_left">This provides the command prototype that will be used
+ to run the translator. Valid substitutions are <tt>%in%</tt> for the
+ input file and <tt>%out%</tt> for the output file.</td>
+ <td><blank></td>
+ </tr>
+ <tr>
+ <td><b>translator.output</b></td>
+ <td><tt>bitcode</tt> or <tt>assembly</tt></td>
+ <td class="td_left">This item specifies the kind of output the language's
+ translator generates.</td>
+ <td><tt>bitcode</tt></td>
+ </tr>
+ <tr>
+ <td><b>translator.preprocesses</b></td>
+ <td>boolean</td>
+ <td class="td_left">Indicates that the translator also preprocesses. If
+ this is true, then <tt>llvmc</tt> will skip the pre-processing phase
+ whenever the final phase is not pre-processing.</td>
+ <td><tt>false</tt></td>
+ </tr>
+ <tr><td colspan="4"><h4>OPTIMIZER ITEMS</h4></td></tr>
+ <tr>
+ <td><b>optimizer.command</b></td>
+ <td>command</td>
+ <td class="td_left">This provides the command prototype that will be used
+ to run the optimizer. Valid substitutions are <tt>%in%</tt> for the
+ input file and <tt>%out%</tt> for the output file.</td>
+ <td><blank></td>
+ </tr>
+ <tr>
+ <td><b>optimizer.output</b></td>
+ <td><tt>bitcode</tt> or <tt>assembly</tt></td>
+ <td class="td_left">This item specifies the kind of output the language's
+ optimizer generates. Valid values are "assembly" and "bitcode"</td>
+ <td><tt>bitcode</tt></td>
+ </tr>
+ <tr>
+ <td><b>optimizer.preprocesses</b></td>
+ <td>boolean</td>
+ <td class="td_left">Indicates that the optimizer also preprocesses. If
+ this is true, then <tt>llvmc</tt> will skip the pre-processing phase
+ whenever the final phase is optimization or later.</td>
+ <td><tt>false</tt></td>
+ </tr>
+ <tr>
+ <td><b>optimizer.translates</b></td>
+ <td>boolean</td>
+ <td class="td_left">Indicates that the optimizer also translates. If
+ this is true, then <tt>llvmc</tt> will skip the translation phase
+ whenever the final phase is optimization or later.</td>
+ <td><tt>false</tt></td>
+ </tr>
+ <tr><td colspan="4"><h4>ASSEMBLER ITEMS</h4></td></tr>
+ <tr>
+ <td><b>assembler.command</b></td>
+ <td>command</td>
+ <td class="td_left">This provides the command prototype that will be used
+ to run the assembler. Valid substitutions are <tt>%in%</tt> for the
+ input file and <tt>%out%</tt> for the output file.</td>
+ <td><blank></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsection"><a name="substitutions">Substitutions</a></div>
+<div class="doc_text">
+ <p>On any configuration item that ends in <tt>command</tt>, you must
+ specify substitution tokens. Substitution tokens begin and end with a percent
+ sign (<tt>%</tt>) and are replaced by the corresponding text. Any substitution
+ token may be given on any <tt>command</tt> line but some are more useful than
+ others. In particular each command <em>should</em> have both an <tt>%in%</tt>
+ and an <tt>%out%</tt> substitution. The table below provides definitions of
+ each of the allowed substitution tokens.</p>
+ <table>
+ <tbody>
+ <tr>
+ <th>Substitution Token</th>
+ <th>Replacement Description</th>
+ </tr>
+ <tr>
+ <td><tt>%args%</tt></td>
+ <td class="td_left">Replaced with all the tool-specific arguments given
+ to <tt>llvmc</tt> via the <tt>-T</tt> set of options. This just allows
+ you to place these arguments in the correct place on the command line.
+ If the <tt>%args%</tt> option does not appear on your command line,
+ then you are explicitly disallowing the <tt>-T</tt> option for your
+ tool.
+ </td>
+ <tr>
+ <td><tt>%force%</tt></td>
+ <td class="td_left">Replaced with the <tt>-f</tt> option if it was
+ specified on the <tt>llvmc</tt> command line. This is intended to tell
+ the compiler tool to force the overwrite of output files.
+ </td>
+ </tr>
+ <tr>
+ <td><tt>%in%</tt></td>
+ <td class="td_left">Replaced with the full path of the input file. You
+ needn't worry about the cascading of file names. <tt>llvmc</tt> will
+ create temporary files and ensure that the output of one phase is the
+ input to the next phase.</td>
+ </tr>
+ <tr>
+ <td><tt>%opt%</tt></td>
+ <td class="td_left">Replaced with the optimization options for the
+ tool. If the tool understands the <tt>-O</tt> options then that will
+ be passed. Otherwise, the <tt>lang.optN</tt> series of configuration
+ items will specify which arguments are to be given.</td>
+ </tr>
+ <tr>
+ <td><tt>%out%</tt></td>
+ <td class="td_left">Replaced with the full path of the output file.
+ Note that this is not necessarily the output file specified with the
+ <tt>-o</tt> option on <tt>llvmc</tt>'s command line. It might be a
+ temporary file that will be passed to a subsequent phase's input.
+ </td>
+ </tr>
+ <tr>
+ <td><tt>%stats%</tt></td>
+ <td class="td_left">If your command accepts the <tt>-stats</tt> option,
+ use this substitution token. If the user requested <tt>-stats</tt>
+ from the <tt>llvmc</tt> command line then this token will be replaced
+ with <tt>-stats</tt>, otherwise it will be ignored.
+ </td>
+ </tr>
+ <tr>
+ <td><tt>%target%</tt></td>
+ <td class="td_left">Replaced with the name of the target "machine" for
+ which code should be generated. The value used here is taken from the
+ <tt>llvmc</tt> option <tt>-march</tt>.
+ </td>
+ </tr>
+ <tr>
+ <td><tt>%time%</tt></td>
+ <td class="td_left">If your command accepts the <tt>-time-passes</tt>
+ option, use this substitution token. If the user requested
+ <tt>-time-passes</tt> from the <tt>llvmc</tt> command line then this
+ token will be replaced with <tt>-time-passes</tt>, otherwise it will
+ be ignored.
+ </td>
+ </tr>
+ </tbody>