Home | History | Annotate | Download | only in demo
      1 
      2 <html>
      3 <head>
      4 <title>
      5 Demo 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 
     14 page.</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
     20 you use stdio (e.g., printf) than iostreams (e.g., std::cout).</li>
     21 
     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>
     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>
     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>
     41 
     42 <h2><a name="lto">Run link-time optimizer</a></h2>
     43 
     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>
     51 
     52 <p>Note that you have to define 'main' in your program for this 
     53 to make much of a difference.
     54 </p>
     55 
     56 <h2><a name="stats">Show detailed pass statistics</a></h2>
     57 
     58 <p>
     59 Select this option to enable compilation timings and statistics from various
     60 optimizers.</p>
     61 
     62 
     63 <h2><a name="bcanalyzer">Analyze generated bytecode</a></h2>
     64 
     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>
     70 
     71 
     72 <h2><a name="llvm2cpp">Show C++ API code</a></h2>
     73 
     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>
     80 
     81 </body>
     82 </html>
     83 
     84