This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Profile-guided optimization
- From: Juan Antonio Farré Basurte <jafb at tinet dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 13 Jan 2009 05:15:49 +0100 (CET)
- Subject: Profile-guided optimization
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