X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2Fprofile.pl;h=f9950f97fea82179c1e22a23b820db1ef18211ac;hb=482eba054ab3543ee0e1f453d3d6441092f4b76d;hp=20810fab9a0964f15e8ebf60272d4f15cdaed7d6;hpb=5cedabafe5decd3c30dea6bf54c5e47ec85c44d9;p=oota-llvm.git diff --git a/utils/profile.pl b/utils/profile.pl index 20810fab9a0..f9950f97fea 100755 --- a/utils/profile.pl +++ b/utils/profile.pl @@ -62,11 +62,10 @@ 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 . "/../../lib/Debug/libprofile_rt.so"; +my $LibProfPath = $libdir . "/profile_rt.so"; system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst"; system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath " .