blob: 4d14758f2eb53cc7b2dc6cbfafa234f7e742540f [file] [log] [blame]
Demo page information
<h1>Demo page information</h1>
<p>Press "back" or <a href=".">click here</a> to return to the demo
<h2><a name="hints">Hints and Advice</a></h2>
<li>The generated LLVM code will be easier to read if
you use stdio (e.g., printf) than iostreams (e.g., std::cout).</li>
<li>Unused inline functions and methods are not generated. Instead
of '<tt>class foo { void bar() {}};</tt>',
try writing '<tt>class foo { void bar(); }; void foo::bar() {}</tt>'.</li>
<li>If you want to try out a file that uses non-standard header files, you should
preprocess it (e.g., with the <tt>-save-temps</tt> or <tt>-E</tt> options to
<tt>gcc</tt>) then upload the result.</li>
<h2><a name="language">Source language</a></h2>
Select the type of source code you want to compile. If you upload a file you
don't need this as the language is detected from the file extension.</p>
<h2><a name="optlevel">Optimization level</a></h2>
<dt><tt><b>Standard</b></tt>: </dt>
Select this option to run a standard set of LLVM optimizations.
<dt><tt><b>LTO</b></tt>: </dt>
Select this option to run the LLVM link-time optimizer, which is designed to
optimize across files in your application. Since the demo page doesn't allow
you to upload multiple files at once, and does not link in any libraries, we
configured the demo page optimizer to assume there are no calls
coming in from outside the source file, allowing it to optimize more
Note that you have to define 'main' in your program for this
to make much of a difference.
<dt><tt><b>None</b></tt>: </dt>
Select this option to turn off all optimizations.
<h2><a name="stats">Show detailed pass statistics</a></h2>
Select this option to enable compilation timings and statistics from various
<h2><a name="demangle">Demangle C++ names with C++ filt</a></h2>
Select this option if you want to run the target output code through "c++filt",
which converts 'mangled' C++ names to their unmangled version.
Note that target code produced will not be lexically valid, but it will
be easier to understand.
<h2><a name="target">Target</a></h2>
Select the target you want to output code for. Generally a target uses the
<a href="">llc</a> tool to output machine assembly
code. However, a few special targets exists: </p>
<dt><tt><b>LLVM assembly</b></tt>: </dt>
Select this option to run the LLVM dissambler
(<a href="">llvm-dis</a> tool) to show the LLVM IR.
<dt><tt><b>LLVM C++ API code</b></tt>: </dt>
Select this option to auto generate the C++ API calls that could be used to
create the .bc file.
<h2><a name="bcanalyzer">Analyze generated bytecode</a></h2>
Select this option to run the <a
href="">llvm-bcanalyzer</a> tool
on the generated bytecode, which introspects into the format of the .bc file
itself. </p>