From patchwork Mon Mar 19 16:07:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 147566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B116DB6FDB for ; Tue, 20 Mar 2012 03:08:32 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1332778113; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Message-Id:Received:Subject:To:Date: From:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=Iui1nXdOnCc/MPLA9sEO au4sCPc=; b=urqqI1kczUX2WfrSdCD23RTS7sEsxSbcDeZzeUNZfFc4EoyYqNeY GWRykYC01nDJxHY8Q+a5jr+q00Wa66FIzXIOKxRVCzdQAuKyVcIEQ8Mdm8ARBSl+ GYKxO3LRpN0bRZJbQNjIWOBs1f7+nG2LcCvQolvcNy/CNV8E6vS8Yxg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Message-Id:Received:Subject:To:Date:From:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:x-cbid:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=k2GBgMNcdF4xFGVveGjOKfy6+4ZGduJR+t8s4x0PvjQqRnBDPrmD9lkC35tCPx NwTB1muEgLo5hAs8t4ytrZwoJcon66oyaaFVhs6C7/CZQQE5NglVYKyWe3RSaazP pNnt3vjfKrSL8p4Nee9PjrnGPs3OKBLBDnMkSvOwnTGHo=; Received: (qmail 8840 invoked by alias); 19 Mar 2012 16:08:19 -0000 Received: (qmail 8740 invoked by uid 22791); 19 Mar 2012 16:08:02 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, MSGID_FROM_MTA_HEADER, TW_FW, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e06smtp14.uk.ibm.com (HELO e06smtp14.uk.ibm.com) (195.75.94.110) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Mar 2012 16:07:37 +0000 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Mar 2012 16:07:36 -0000 Received: from d06nrmr1407.portsmouth.uk.ibm.com (9.149.38.185) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Mar 2012 16:07:34 -0000 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2JG7XDb2502696 for ; Mon, 19 Mar 2012 16:07:33 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2JG7XaI021763 for ; Mon, 19 Mar 2012 10:07:33 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id q2JG7WNl021730; Mon, 19 Mar 2012 10:07:32 -0600 Message-Id: <201203191607.q2JG7WNl021730@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 19 Mar 2012 17:07:32 +0100 Subject: [PATCH] allowing fwprop to propagate subregs To: gcc-patches@gcc.gnu.org Date: Mon, 19 Mar 2012 17:07:32 +0100 (CET) From: "Ulrich Weigand" Cc: rsandiford@googlemail.com, bonzini@gnu.org, richard.guenther@gmail.com, patches@linaro.org MIME-Version: 1.0 x-cbid: 12031916-1948-0000-0000-0000013DB777 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, now that the apply_distributive_law change is in, I'd like to pick up Richard's original patch, see discussion here: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00852.html The version below integrates all requests for changes that were raised. It's been part of Linaro GCC releases in this form for a while with no problem reported. We see performance improvements in several libav loops, as described in Richard's original mail. We've seen no test case so far where this patch (against current baseline) has shown any significant performance regressions. Re-tested on arm-linux-gnueabi and i386-linux-gnu with no regressions. OK for mainline? Bye, Ulrich ChangeLog: * fwprop.c (propagate_rtx): Also set PR_CAN_APPEAR for subregs. === modified file 'gcc/fwprop.c' --- gcc/fwprop.c 2011-12-19 22:05:28 +0000 +++ gcc/fwprop.c 2012-02-22 11:57:19 +0000 @@ -664,7 +664,12 @@ return NULL_RTX; flags = 0; - if (REG_P (new_rtx) || CONSTANT_P (new_rtx)) + if (REG_P (new_rtx) + || CONSTANT_P (new_rtx) + || (GET_CODE (new_rtx) == SUBREG + && REG_P (SUBREG_REG (new_rtx)) + && (GET_MODE_SIZE (mode) + <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (new_rtx)))))) flags |= PR_CAN_APPEAR; if (!for_each_rtx (&new_rtx, varying_mem_p, NULL)) flags |= PR_HANDLE_MEM;