Fix the clang-wpa example.
[clang.git] / www / demo / DemoInfo.html
blob54a5afa1d799915f7d36ab61f61f2ef3dbb4c8d9
2 <html>
3 <head>
4 <title>
5 Demo page information
6 </title>
7 </head>
9 <body>
11 <h1>Demo page information</h1>
13 <p>Press "back" or <a href=".">click here</a> to return to the demo
14 page.</p>
16 <h2><a name="hints">Hints and Advice</a></h2>
18 <ul>
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>
30 </ul>
33 <h2><a name="demangle">Demangle C++ names with C++ filt</a></h2>
35 <p>
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.
40 </p>
42 <h2><a name="lto">Run link-time optimizer</a></h2>
44 <p>
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
50 aggressively.</p>
52 <p>Note that you have to define 'main' in your program for this
53 to make much of a difference.
54 </p>
56 <h2><a name="stats">Show detailed pass statistics</a></h2>
58 <p>
59 Select this option to enable compilation timings and statistics from various
60 optimizers.</p>
63 <h2><a name="bcanalyzer">Analyze generated bytecode</a></h2>
65 <p>
66 Select this option to run the <a
67 href="http://llvm.org/cmds/llvm-bcanalyzer.html">llvm-bcanalyzer</a> tool
68 on the generated bytecode, which introspects into the format of the .bc file
69 itself. </p>
72 <h2><a name="llvm2cpp">Show C++ API code</a></h2>
74 <p>
75 Select this option to run the <a
76 href="http://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.
79 </p>
81 </body>
82 </html>