X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fprofile.pl;h=857fbfc16458b8c10234bd7535fa7306fd8a341a;hb=48e9f26df5f6085a1c972069ba6aa227821cd41c;hp=d7c7ef3ddf3d9eae83bccca8e1eda9ac29d215af;hpb=0faadf2e589b7bbeb740899429a659f576f29683;p=oota-llvm.git diff --git a/utils/profile.pl b/utils/profile.pl index d7c7ef3ddf3..857fbfc1645 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 \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";