[llvm-commits] CVS: llvm/utils/profile.pl

Chris Lattner lattner at cs.uiuc.edu
Sat Nov 1 23:18:01 PST 2003


Changes in directory llvm/utils:

profile.pl updated: 1.3 -> 1.4

---
Log message:

Add -help option


---
Diffs of the changes:  (+11 -2)

Index: llvm/utils/profile.pl
diff -u llvm/utils/profile.pl:1.3 llvm/utils/profile.pl:1.4
--- llvm/utils/profile.pl:1.3	Wed Oct 29 15:51:00 2003
+++ llvm/utils/profile.pl	Sat Nov  1 23:17:32 2003
@@ -23,7 +23,16 @@
   last if /^--$/;  # Stop processing arguments on --
 
   # List command line options here...
-  if (/^-block$/) { $ProfilePass = "-insert-block-profiling"; next; }
+  if (/^-?-block$/) { $ProfilePass = "-insert-block-profiling"; next; }
+  if (/^-?-help$/) {
+    print "OVERVIEW: profile.pl - Instrumentation and profile printer.\n\n";
+    print "USAGE: profile.pl [options] program.bc <program args>\n\n";
+    print "OPTIONS:\n";
+    print "  -block - Enable basic block level profiling\n";
+    print "  -help  - Print this usage information\n";
+    print "\nAll other options are passed into llvm-prof.\n";
+    exit 1;
+  }
 
   # Otherwise, pass the option on to llvm-prof
   $LLVMProfOpts .= " " . $_;
@@ -41,7 +50,7 @@
 
 my $LibProfPath = $LLIPath . "/../../lib/Debug/libprofile_rt.so";
 
-system "opt $ProfilePass < $BytecodeFile | lli -fake-argv0 '$BytecodeFile'" .
+system "opt -q $ProfilePass < $BytecodeFile | lli -fake-argv0 '$BytecodeFile'" .
        " -load $LibProfPath - " . (join ' ', @ARGV);
 
 system "llvm-prof $LLVMProfOpts $BytecodeFile";





More information about the llvm-commits mailing list