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: updating edge profiling





qiongc@cse.unsw.edu.au wrote on 06/08/2004 08:07:21 AM:

> Hi,
>
> I met a problem of updating edge profiling when the CFG
> is implicitly changed.
>
> For example(maybe silly), x = a - b is changed to the following
> codes:
>   if ( a == b )
>     x = 0;   // 10000 times
>   else       // 0 time
>       x = a - b;
>
> we may implement this as:
>
>   start_sequence()
>   ...
>   do_compare_rtx_jump (...)
>   emit_label (...)
>   emit_move_insn (...)
>   ...
>   seq = get_insns ();
>   end_sequence()
>   rebuild_jump_lables ()
>   commit_edge_insertsion()
>
> However, it seems there's no place to update edge profiling
> information in the above codes, even though we know the branch
> probabilities.
>
> The same problem also exists in the value-profile.c, because it
> changed the CFG too.
>
> Is there any  way to update edge profile? Thanks.


Following is what I recently proposed for fixing up value-prof.c

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01558.html

-Pat


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