[llvm-commits] CVS: llvm-www/demo/index.cgi
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Nov 20 18:46:01 PST 2003
Changes in directory llvm-www/demo:
index.cgi updated: 1.12 -> 1.13
---
Log message:
Show statistics and pass timings, if they want to see them.
---
Diffs of the changes: (+16 -3)
Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.12 llvm-www/demo/index.cgi:1.13
--- llvm-www/demo/index.cgi:1.12 Thu Nov 20 18:34:52 2003
+++ llvm-www/demo/index.cgi Thu Nov 20 18:45:30 2003
@@ -5,7 +5,7 @@
# doing remote web JO99C compilations. (It could still be used for that
# purpose, though the two scripts have diverged somewhat.)
#
-# Last modified $Date: 2003/11/21 00:34:52 $
+# Last modified $Date: 2003/11/21 00:45:30 $
#
use CGI;
@@ -173,6 +173,14 @@
-name => 'linkopt',
-label => 'Run link-time optimizer'
), "</ul>";
+
+print "</td><td>";
+
+print "<p>Would you believe the cat even has a stopwatch? Click here to get detailed compilation statistics from each pass.</p><ul>",
+ $c->checkbox(
+ -name => 'showstats',
+ -label => 'Show detailed statistics'
+), "</ul>";
print "</td></tr></table>";
print "<p>", $c->submit, "\n", $c->endform;
@@ -274,14 +282,19 @@
my $bytecodeFile = getname(".o");
my $outputFile = getname(".llvm-gcc.out");
+
+ my $stats = '';
+ $stats = '-Wa,--stats,--time-passes' if ($c->param('showstats'));
try_run( "llvm-gcc",
- "llvm-gcc -o $bytecodeFile -c $inputFile > $outputFile 2>&1",
+ "llvm-gcc $stats -o $bytecodeFile -c $inputFile > $outputFile 2>&1",
$outputFile );
if ( $c->param('linkopt') ) {
+ my $stats = '';
+ $stats = '--stats --time-passes' if ($c->param('showstats'));
print " Running link-time optimizer.\n";
my $tmpFile = getname(".bc");
- system("gccld --link-as-library -o=$tmpFile $bytecodeFile 2>&1");
+ system("gccld $stats --link-as-library -o=$tmpFile $bytecodeFile 2>&1");
system("mv $tmpFile $bytecodeFile");
}
More information about the llvm-commits
mailing list