From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16979 invoked by alias); 19 May 2003 13:57:54 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16943 invoked from network); 19 May 2003 13:57:51 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.18.106) by sources.redhat.com with SMTP; 19 May 2003 13:57:51 -0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 17ED14E265; Mon, 19 May 2003 15:57:52 +0200 (CEST) Date: Mon, 19 May 2003 14:25:00 -0000 From: Jan Hubicka To: Nathan Sidwell Cc: Jie Zhang , gcc@gcc.gnu.org, Jan Hubicka Subject: Re: [PATCH] Re: Option -fprofile-arcs fails for target avr and fr30 Message-ID: <20030519135752.GD15316@kam.mff.cuni.cz> References: <3EC4B4D8.1040504@magima.com.cn> <3EC84136.6040705@magima.com.cn> <3EC89EDC.4000706@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EC89EDC.4000706@codesourcery.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2003-05/txt/msg01752.txt.bz2 > Jie Zhang wrote: > > >The following patch may fix this problem. > > > >- J > > > > > >2003-05-12 Jie Zhang > > > > 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