From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1257 invoked by alias); 10 Sep 2008 09:49:05 -0000 Received: (qmail 1245 invoked by uid 22791); 10 Sep 2008 09:49:05 -0000 X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 Sep 2008 09:48:26 +0000 Received: from localhost (occam.ms.mff.cuni.cz [195.113.18.121]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id E10541535B3 for ; Wed, 10 Sep 2008 11:48:17 +0200 (CEST) Received: by localhost (Postfix, from userid 16202) id 38B2293942; Wed, 10 Sep 2008 11:48:23 +0200 (CEST) Date: Wed, 10 Sep 2008 12:28:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix -fprofile-use miscompilation of tramp3d and read-rtl.c Message-ID: <20080910094823.GC3195@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg00810.txt.bz2 Hi, this patch fixes tuplification bug that makes us to compile working tramp3d with -fprofile-use again. I also fixed one uninitialized var warking showing during profiledbootstrap. We now build -fprofile-use cc1 that ICEs shortly in compiling libgcc on memory corruption. Otherwise it seems to work and produce same output as non-profiled. It is about 8% faster compiling GCC modules than unprofiled compiler. Binary shrinks from 940Kb to 900Kb as a result of optimize_*_for_size changes that is IMO quite nice. Interestingly the largest speedups we used to have on empty files seems gone (at least compiling 100 empty files takes about same time). I think it is result of optimizing initialization of register move tables and friends so we are now fully memory bound starting up. Honza * value-prof.c (gimple_ic): Fix tuplification bug. * sched-deps.c (sched_insns_conditions_mutex_p): Silence unitialized var warning. Index: value-prof.c =================================================================== *** value-prof.c (revision 140145) --- value-prof.c (working copy) *************** gimple_ic (gimple stmt, gimple call, str *** 1117,1124 **** bb1end = stmt3; stmt1 = gimple_copy (stmt); ! gimple_call_set_fn (stmt, ! build_addr (direct_call->decl, current_function_decl)); gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT); bb2end = stmt1; bb3end = stmt; --- 1117,1123 ---- bb1end = stmt3; stmt1 = gimple_copy (stmt); ! gimple_call_set_fndecl (stmt1, direct_call->decl); gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT); bb2end = stmt1; bb3end = stmt; Index: sched-deps.c =================================================================== *** sched-deps.c (revision 140145) --- sched-deps.c (working copy) *************** bool *** 527,533 **** sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2) { rtx cond1, cond2; ! bool rev1, rev2; /* df doesn't handle conditional lifetimes entirely correctly; calls mess up the conditional lifetimes. */ --- 527,533 ---- sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2) { rtx cond1, cond2; ! bool rev1 = false, rev2 = false; /* df doesn't handle conditional lifetimes entirely correctly; calls mess up the conditional lifetimes. */