From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32713 invoked by alias); 3 Aug 2014 14:20:02 -0000 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 Received: (qmail 32688 invoked by uid 89); 3 Aug 2014 14:20:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 03 Aug 2014 14:20:00 +0000 Received: by mail-wi0-f182.google.com with SMTP id d1so3649440wiv.3 for ; Sun, 03 Aug 2014 07:19:57 -0700 (PDT) X-Received: by 10.180.183.165 with SMTP id en5mr22331369wic.41.1407075597815; Sun, 03 Aug 2014 07:19:57 -0700 (PDT) Received: from localhost ([95.145.138.172]) by mx.google.com with ESMTPSA id yw9sm31353646wjc.31.2014.08.03.07.19.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Aug 2014 07:19:57 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [PATCH 35/50] regcprop.c:cprop_find_used_regs References: <87y4v5d77q.fsf@googlemail.com> Date: Sun, 03 Aug 2014 14:20:00 -0000 In-Reply-To: <87y4v5d77q.fsf@googlemail.com> (Richard Sandiford's message of "Sun, 03 Aug 2014 14:38:01 +0100") Message-ID: <87r40x7j03.fsf@googlemail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-08/txt/msg00171.txt.bz2 gcc/ * regcprop.c (cprop_find_used_regs_1): Delete. (cprop_find_used_regs): Use FOR_EACH_SUBRTX instead of for_each_rtx. Index: gcc/regcprop.c =================================================================== --- gcc/regcprop.c 2014-08-03 11:25:29.603148851 +0100 +++ gcc/regcprop.c 2014-08-03 11:25:29.878151570 +0100 @@ -702,33 +702,28 @@ apply_debug_insn_changes (struct value_d apply_change_group (); } -/* Called via for_each_rtx, for all used registers in a real - insn apply DEBUG_INSN changes that change registers to the - used register. */ - -static int -cprop_find_used_regs_1 (rtx *loc, void *data) -{ - if (REG_P (*loc)) - { - struct value_data *vd = (struct value_data *) data; - if (vd->e[REGNO (*loc)].debug_insn_changes) - { - apply_debug_insn_changes (vd, REGNO (*loc)); - free_debug_insn_changes (vd, REGNO (*loc)); - } - } - return 0; -} - /* Called via note_uses, for all used registers in a real insn apply DEBUG_INSN changes that change registers to the used registers. */ static void -cprop_find_used_regs (rtx *loc, void *vd) +cprop_find_used_regs (rtx *loc, void *data) { - for_each_rtx (loc, cprop_find_used_regs_1, vd); + struct value_data *const vd = (struct value_data *) data; + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, *loc, NONCONST) + { + const_rtx x = *iter; + if (REG_P (x)) + { + unsigned int regno = REGNO (x); + if (vd->e[regno].debug_insn_changes) + { + apply_debug_insn_changes (vd, regno); + free_debug_insn_changes (vd, regno); + } + } + } } /* Perform the forward copy propagation on basic block BB. */