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: [PATCH] Re: Option -fprofile-arcs fails for target avr and fr30


> Jie Zhang wrote:
> 
> >The following patch may fix this problem.
> >
> >- J
> >
> >
> >2003-05-12  Jie Zhang  <zhangjie@magima.com.cn>
> >
> >       Fix the FAILs of gcc.misc-tests/bprob-1.c and 
> >gcc.misc-tests/bprob-2.c
> >       on target avr and fr30.
> >       * cfgbuild.c (make_edges): Find JUMP_LABELs for the new JUMP_INSNs
> >       introduced by instrument code after jump optimization pass.
> It would probably be sensible to only enable that code when 
> flag_profile_arcs
> is true -- otherwise you might be hiding a bug in GCC. Jan, what do you
> think?

There is code to set the JUMP_LABEL properly in the code to emit insn on
the edges: 
	      insert_insn_on_edge (edge_profile, e);
	      rebuild_jump_labels (e->insns);
rebuild_jump_labels is supposed to update JUMP_LABEL accordingly.
In case the profiling code somewhere does not update labels correctly it
is the bug on place where code is emit.  I will try to figure out what
happens tomorrow. At the time the basic blocks are split, all
JUMP_LABELs are supposed to be up-to-date.

Honza


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