This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Move rest_of_handle_ branch_prob before GCSE
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Qiong Cai <qiongc at cse dot unsw dot edu dot au>
- Cc: 'Jan Hubicka' <hubicka at ucw dot cz>, 'Gcc' <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Feb 2004 08:08:56 +0100
- Subject: Re: Move rest_of_handle_ branch_prob before GCSE
- References: <000001c3f9b1$b00cc3a0$16f15e81@codebook>
Hello,
> As "rest_of_handle_branch_prob" mainly contains two functions, one is
> "branch_prob" for collecting real profiling and instrumentation, and
> "estimate_probability" for estimating profiling. I'd like to use "real"
> profiling in "gcse" pass and later optimizations use "estimated"
> profiling. Do you think the following configuration make sense:
>
> [branch_prob]
> // collecting real profiling or instrumentation for gcse module
> [rest_of_handle_gcse]
> flag_branch_probability = 0;
> // only consider "estimated" profiling in later optimizations
> [rest_of_handle_loop_optimize}
> [rest_of_handle_jump_bypass]
> [rest_of_handle_cfg]
> [estimate_probability]
>
> Will this configuration have negative impact on other optimizations
> apart from "gcse" pass?
definitely. You usually get much better results by using the real
profile than by estimating it.
We are currently working on getting rid of the old loop optimizer, which
would enable moving profiling before gcse (probably even much sooner,
really.) We hope to be able to do this in 3.5, although the situation of
the tree-ssa branch makes this quite unsure.
For now I however do not see a problem with the other approach -- using
the profile estimation in pre-loop passes.
Zdenek