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