Profile-guided optimization

Juan Antonio Farré Basurte jafb@tinet.org
Tue Jan 13 04:16:00 GMT 2009



Hi,

I want to use profile-guided optimization in my current development project. I have a doubt for which I can't find an answer
anywhere.

The basic idea of PGO is:
1. Build instrumented code
2. Run real-world representative tests to generate profile
info.
3. Build code using profile info for optimizations.

My doubt is whether I should build instrumented code (step 1) already
with the same optimization options I want to finally use in step 3, or I'd get more realistical profile info if I compile step 1 without any
optimization (or may be some intermediate option).

Does anybody have any hints about this question?

Thanks a lot,

Juan Farré
jafb@tinet.org




More information about the Gcc-help mailing list