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