11 <h1>Demo page information
</h1>
13 <p>Press
"back" or
<a href=
".">click here
</a> to return to the demo
16 <h2><a name=
"hints">Hints and Advice
</a></h2>
19 <li>The generated LLVM code will be easier to read if
20 you use stdio (e.g., printf) than iostreams (e.g., std::cout).
</li>
22 <li>Unused inline functions and methods are not generated. Instead
23 of '
<tt>class foo { void bar() {}};
</tt>',
24 try writing '
<tt>class foo { void bar(); }; void foo::bar() {}
</tt>'.
</li>
26 <li>If you want to try out a file that uses non-standard header files, you should
27 preprocess it (e.g., with the
<tt>-save-temps
</tt> or
<tt>-E
</tt> options to
28 <tt>gcc
</tt>) then upload the result.
</li>
33 <h2><a name=
"demangle">Demangle C++ names with C++ filt
</a></h2>
36 Select this option if you want to run the output LLVM IR through
"c++filt",
37 which converts 'mangled' C++ names to their unmangled version.
38 Note that LLVM code produced will not be lexically valid, but it will
39 be easier to understand.
42 <h2><a name=
"lto">Run link-time optimizer
</a></h2>
45 Select this option to run the LLVM link-time optimizer, which is designed to
46 optimize across files in your application. Since the demo page doesn't allow
47 you to upload multiple files at once, and does not link in any libraries, we
48 configured the demo page optimizer to assume there are no calls
49 coming in from outside the source file, allowing it to optimize more
52 <p>Note that you have to define 'main' in your program for this
53 to make much of a difference.
56 <h2><a name=
"stats">Show detailed pass statistics
</a></h2>
59 Select this option to enable compilation timings and statistics from various
63 <h2><a name=
"bcanalyzer">Analyze generated bytecode
</a></h2>
66 Select this option to run the
<a
67 href=
"https://llvm.org/docs/CommandGuide/llvm-bcanalyzer.html">llvm-bcanalyzer
</a> tool
68 on the generated bytecode, which introspects into the format of the .bc file
72 <h2><a name=
"llvm2cpp">Show C++ API code
</a></h2>
75 Select this option to run the
<a
76 href=
"https://llvm.org/cmds/llvm2cpp.html">llvm2cpp
</a> tool
77 on the generated bytecode, which auto generates the C++ API calls that could
78 be used to create the .bc file.