Profile-Guided Optimization status

Hi all,

I would like to know the status of profile-guided optimization. What enhancements could be done to the current implementation? The ideas for profile-guided transformations from [0] are still available?

Many thanks.
Gener

[0] http://llvm.org/OpenProjects.html#profileguided

Any sugestions?

Hi,

sorry to be so late with my answer, I was busy finishing my master thesis.

I have finally started my project which is supposed to implement some
algorithms that uses profile information in order to optimize programs.
I have a very basic question for you. I have a very simple source code,
I compiled it with LLVM

llvm-gcc -emit-llvm -c test.c -o test.bc,

then I used the script named `profile.pl <http://profile.pl>`

perl /home/gener/LLVM/llvm-2.6/utils/profile.pl <http://profile.pl> test.bc.

After several runs, I have used the `opt` tool in this way:

opt -profile-loader test.bc -f -o test1.bc

in order to rearrange the bitcode file taking into account the profiling
information. However, I saw that the bitcode file didn't changed, even
if the profiling information shows that one basic block need to be
moved. I know that BBs reordering is implemented in LLVM.

I guess that the profiling information is not surviving other passes.

You can enable the pass debuging with "--debug-pass=Details" and see what passes are called and when and how the analysis info generated by the profile-loader is destroyed again.

Also I guess you have to request the optimisation explicitly by using something like

$> opt -debug-pass=Details -debug -profile-loader -block-placement <infile> -o <outfile>

I have tried this and it seems to work in r96682 already.

Andi