This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move rest_of_handle_ branch_prob before GCSE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]