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

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 29 15:52:02 PST 2003


Changes in directory llvm/utils:

profile.pl updated: 1.2 -> 1.3

---
Log message:

Pass unrecognized options into llvmprof


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

Index: llvm/utils/profile.pl
diff -u llvm/utils/profile.pl:1.2 llvm/utils/profile.pl:1.3
--- llvm/utils/profile.pl:1.2	Tue Oct 28 16:52:05 2003
+++ llvm/utils/profile.pl	Wed Oct 29 15:51:00 2003
@@ -10,9 +10,13 @@
 # OPTIONS may include one or more of the following:
 #     -block - Enable basic block level profiling
 #
+# Any unrecognized options are passed into the invocation of llvm-prof
+#
 
 my $ProfilePass = "-insert-function-profiling";
 
+my $LLVMProfOpts = "";
+
 # Parse arguments...
 while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
   shift;
@@ -21,7 +25,8 @@
   # List command line options here...
   if (/^-block$/) { $ProfilePass = "-insert-block-profiling"; next; }
 
-  print "Unknown option: $_ : ignoring!\n";
+  # Otherwise, pass the option on to llvm-prof
+  $LLVMProfOpts .= " " . $_;
 }
 
 die "Must specify LLVM bytecode file as first argument!" if (@ARGV == 0);
@@ -39,4 +44,4 @@
 system "opt $ProfilePass < $BytecodeFile | lli -fake-argv0 '$BytecodeFile'" .
        " -load $LibProfPath - " . (join ' ', @ARGV);
 
-system "llvm-prof $BytecodeFile";
+system "llvm-prof $LLVMProfOpts $BytecodeFile";





More information about the llvm-commits mailing list