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: 7358 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E7A7023E0C for ; Mon, 19 Mar 2012 16:07:51 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id A3AF3A18743 for ; Mon, 19 Mar 2012 16:07:51 +0000 (UTC) Received: by iage36 with SMTP id e36so12809684iag.11 for ; Mon, 19 Mar 2012 09:07:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:message-id :subject:to:date:from:cc:x-mailer:mime-version:content-type :content-transfer-encoding:x-cbid:x-gm-message-state; bh=+9jAb6bNFR6P7UfGm7sH+n8307Ju43oxuj9h8GnGfqg=; b=mgvLwWKhCDpePeX4oSDe141MTlbB3M7rtv8BCbZlfY8bu4XIgqOdReiOLoyzD+aS5u 0UxFw0HVlrq38mQslzo7dL+TwvAs1IF/YKQoi5v7Zp7EfBEhHupGwuSp7iVnnwqDfj1P T9twaRD0pz8L7OpDNMjqDgZowzqLzCKWQNDtqEY1yi/SFtKgE1HbTtYNlje42G8QQVXL dNChskQorNDSybuAI8aMut9dzMHsccscfLSreE7aYdBSYk1mBT7R5PYh3FU19IKUJzM6 Sr2TQ0Ms1itQrw8YY3sn7rSXS13Dy5fzOMEEG+STQcbGD8/ILlEM8PjaT6xcA44U5AL0 Bdgw== Received: by 10.50.156.226 with SMTP id wh2mr3040672igb.2.1332173270996; Mon, 19 Mar 2012 09:07:50 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.203.79 with SMTP id fh15csp76551ibb; Mon, 19 Mar 2012 09:07:50 -0700 (PDT) Received: by 10.216.135.103 with SMTP id t81mr7476702wei.113.1332173269235; Mon, 19 Mar 2012 09:07:49 -0700 (PDT) Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com. [195.75.94.109]) by mx.google.com with ESMTPS id dw1si10288113wib.20.2012.03.19.09.07.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Mar 2012 09:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of uweigand@de.ibm.com designates 195.75.94.109 as permitted sender) client-ip=195.75.94.109; Authentication-Results: mx.google.com; spf=pass (google.com: domain of uweigand@de.ibm.com designates 195.75.94.109 as permitted sender) smtp.mail=uweigand@de.ibm.com Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Mar 2012 16:07:48 -0000 Received: from d06nrmr1806.portsmouth.uk.ibm.com (9.149.39.193) by e06smtp13.uk.ibm.com (192.168.101.143) 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 d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2JG7YVg2142300 for ; Mon, 19 Mar 2012 16:07:34 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 q2JG7XaQ021763 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 X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 x-cbid: 12031916-2966-0000-0000-0000038DFBD5 X-Gm-Message-State: ALoCoQluZFLWn3mHPBYJpaQMHp/djxFAw2utvN1FG0M2AWq5l0TOmJIAthBm3tn4iWsJ8cC1uOuO 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;