From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6910 invoked by alias); 4 Nov 2011 10:11:06 -0000 Received: (qmail 6898 invoked by uid 22791); 4 Nov 2011 10:11:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gy0-f175.google.com (HELO mail-gy0-f175.google.com) (209.85.160.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 10:10:50 +0000 Received: by gyh4 with SMTP id 4so1172746gyh.20 for ; Fri, 04 Nov 2011 03:10:50 -0700 (PDT) Received: by 10.150.116.16 with SMTP id o16mr13512343ybc.8.1320401450071; Fri, 04 Nov 2011 03:10:50 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-178-161.ip50.fastwebnet.it. [93.34.178.161]) by mx.google.com with ESMTPS id k20sm26351357ann.15.2011.11.04.03.10.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 03:10:49 -0700 (PDT) Message-ID: <4EB3BA25.7080204@gnu.org> Date: Fri, 04 Nov 2011 10:27:00 -0000 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Eric Botcazou CC: Joern Rennecke , gcc-patches@gcc.gnu.org Subject: Re: RFA: Fix dse / postreload not to bypass add expanders References: <20111101045348.qp9lxw7jhkogcook-nzlynne@webmail.spamcop.net> <201111032001.00867.ebotcazou@adacore.com> In-Reply-To: <201111032001.00867.ebotcazou@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2011-11/txt/msg00517.txt.bz2 On 11/03/2011 08:01 PM, Eric Botcazou wrote: > + info.insert_before = insn; > + info.first = new_insn; > + info.fixed_regs_live = insn_info->fixed_regs_live; > + info.failure = false; > + for (cur = new_insn; cur; cur = NEXT_INSN (cur)) > + { > + info.current = cur; > + note_stores (PATTERN (cur), note_add_store,&info); > + } Unless I'm missing something, this is going all the way down to the end of the function, bypassing the CFG, so it is neither efficient nor correct. For DSE you should set up backwards liveness simulation, and use that instead of note_stores and insn scanning. I don't know postreload well enough, but liveness simulation might work there too. Paolo