From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8315 invoked by alias); 19 May 2003 09:07:51 -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 8274 invoked from network); 19 May 2003 09:07:50 -0000 Received: from unknown (HELO garibaldi.home) (62.30.75.143) by sources.redhat.com with SMTP; 19 May 2003 09:07:50 -0000 Received: from codesourcery.com (localhost.localdomain [127.0.0.1]) by garibaldi.home (8.12.8/8.12.8) with ESMTP id h4J97ejs014449; Mon, 19 May 2003 10:07:42 +0100 Message-ID: <3EC89EDC.4000706@codesourcery.com> Date: Mon, 19 May 2003 09:20:00 -0000 From: Nathan Sidwell Organization: Codesourcery LLC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jie Zhang CC: gcc@gcc.gnu.org, Jan Hubicka Subject: Re: [PATCH] Re: Option -fprofile-arcs fails for target avr and fr30 References: <3EC4B4D8.1040504@magima.com.cn> <3EC84136.6040705@magima.com.cn> In-Reply-To: <3EC84136.6040705@magima.com.cn> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg01742.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? nathan > --- cfgbuild.c 2003-01-09 20:40:44.000000000 +0800 > +++ cfgbuild-new.c 2003-05-19 09:58:23.000000000 +0800 > @@ -398,8 +398,17 @@ make_edges (label_value_list, min, max, > /* Otherwise, we have a plain conditional or unconditional > jump. */ > else > { > + rtx tmp; > + > + /* Instrument code may introduce new JUMP_INSNs after jump > + optimization pass. So we find JUMP_LABELs for these new > + JUMP_INSNs. */ > + if (! JUMP_LABEL (insn) && (tmp = condjump_label (insn))) > + JUMP_LABEL (insn) = XEXP (tmp, 0); > + > if (! JUMP_LABEL (insn)) > abort (); > + > make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0); > } > } > -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC The voices in my head said this was stupid too nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk