1
2<html>
3<head>
4<title>
5Demo page information
6</title>
7</head>
8
9<body>
10
11<h1>Demo page information</h1>
12
13<p>Press "back" or <a href=".">click here</a> to return to the demo
14page.</p>
15
16<h2><a name="hints">Hints and Advice</a></h2>
17
18<ul>
19<li>The generated LLVM code will be easier to read if
20you use stdio (e.g., printf) than iostreams (e.g., std::cout).</li>
21
22<li>Unused inline functions and methods are not generated.  Instead
23of '<tt>class foo { void bar() {}};</tt>',
24try writing '<tt>class foo { void bar(); }; void foo::bar() {}</tt>'.</li>
25
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>
29
30</ul>
31
32
33<h2><a name="demangle">Demangle C++ names with C++ filt</a></h2>
34
35<p>
36Select this option if you want to run the output LLVM IR through "c++filt",
37which converts 'mangled' C++ names to their unmangled version.
38Note that LLVM code produced will not be lexically valid, but it will
39be easier to understand.
40</p>
41
42<h2><a name="lto">Run link-time optimizer</a></h2>
43
44<p>
45Select this option to run the LLVM link-time optimizer, which is designed to
46optimize across files in your application.  Since the demo page doesn't allow
47you to upload multiple files at once, and does not link in any libraries, we
48configured the demo page optimizer to assume there are no calls
49coming in from outside the source file, allowing it to optimize more
50aggressively.</p>
51
52<p>Note that you have to define 'main' in your program for this
53to make much of a difference.
54</p>
55
56<h2><a name="stats">Show detailed pass statistics</a></h2>
57
58<p>
59Select this option to enable compilation timings and statistics from various
60optimizers.</p>
61
62
63<h2><a name="bcanalyzer">Analyze generated bytecode</a></h2>
64
65<p>
66Select this option to run the <a
67href="http://llvm.org/cmds/llvm-bcanalyzer.html">llvm-bcanalyzer</a> tool
68on the generated bytecode, which introspects into the format of the .bc file
69itself.  </p>
70
71
72<h2><a name="llvm2cpp">Show C++ API code</a></h2>
73
74<p>
75Select this option to run the <a
76href="http://llvm.org/cmds/llvm2cpp.html">llvm2cpp</a> tool
77on the generated bytecode, which auto generates the C++ API calls that could
78be used to create the .bc file.
79</p>
80
81</body>
82</html>
83
84