summaryrefslogtreecommitdiff
path: root/utils/profile.pl
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-02 05:17:32 +0000
committerChris Lattner <sabre@nondot.org>2003-11-02 05:17:32 +0000
commit1ca922110d262161ce922ce314bcdaadf5bbe752 (patch)
tree4c56a4942d647d57877241437aa4da8a71818294 /utils/profile.pl
parent8222eca26988d324d535d4e30e4624ecd1a06e32 (diff)
downloadllvm-1ca922110d262161ce922ce314bcdaadf5bbe752.tar.gz
llvm-1ca922110d262161ce922ce314bcdaadf5bbe752.tar.bz2
llvm-1ca922110d262161ce922ce314bcdaadf5bbe752.tar.xz
Add -help option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/profile.pl')
-rwxr-xr-xutils/profile.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/profile.pl b/utils/profile.pl
index d7c7ef3ddf..857fbfc164 100755
--- a/utils/profile.pl
+++ b/utils/profile.pl
@@ -23,7 +23,16 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
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 @@ chomp $LLIPath;
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";