projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add highlighting for "int" keyword
[oota-llvm.git]
/
utils
/
profile.pl
diff --git
a/utils/profile.pl
b/utils/profile.pl
index ad0be073c8295baf130d4ac0dd5a25f31dc8bd6d..782e5dc24d468e686dbada7cd30827adb3fedd7a 100755
(executable)
--- a/
utils/profile.pl
+++ b/
utils/profile.pl
@@
-5,7
+5,7
@@
# Synopsis: Insert instrumentation code into a program, run it with the JIT,
# then print out a profile report.
#
# Synopsis: Insert instrumentation code into a program, run it with the JIT,
# then print out a profile report.
#
-# Syntax: profile.pl [OPTIONS] b
yte
codefile <arguments>
+# Syntax: profile.pl [OPTIONS] b
it
codefile <arguments>
#
# OPTIONS may include one or more of the following:
# -block - Enable basicblock profiling
#
# OPTIONS may include one or more of the following:
# -block - Enable basicblock profiling
@@
-56,17
+56,16
@@
while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
$LLVMProfOpts .= " " . $_;
}
$LLVMProfOpts .= " " . $_;
}
-die "Must specify LLVM b
yte
code file as first argument!" if (@ARGV == 0);
+die "Must specify LLVM b
it
code file as first argument!" if (@ARGV == 0);
my $BytecodeFile = $ARGV[0];
shift @ARGV;
my $BytecodeFile = $ARGV[0];
shift @ARGV;
-my $LLIPath = `which lli`;
-$LLIPath = `dirname $LLIPath`;
-chomp $LLIPath;
+my $libdir = `llvm-config --libdir`;
+chomp $libdir;
-my $LibProfPath = $
LLIPath . "/../../Debug/lib/
profile_rt.so";
+my $LibProfPath = $
libdir . "/lib
profile_rt.so";
system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst";
system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath " .
system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst";
system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath " .