From patchwork Wed Oct 30 22:50:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 287360 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 131AE2C03B4 for ; Thu, 31 Oct 2013 09:51:03 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; q=dns; s=default; b=qf3Xhknt7byrr1h otkZRKPkCsFwodbqy+dm+rh9edsfjLSw4qBLwzsNiFUI2qaEiQFOvjlbBxZUD7D8 PWOFPfE/P6VzYQn6tdyJLDrojpD1/mdSqR/TitvfHu/SFIftZlCZfrQenUlfSHkY q9XxAWKgqQP9Y9OuICGmLfh+FHDM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; s=default; bh=7kd8UJfp6ACWhJUeDa5Eb BAGmDY=; b=verSz3TKQXVyffxU4ncGuF7vwS2GnSDbKVJPWIvfwj20F1COI/gO3 b60BpE35zym7aihbDhqcNtAIa7X/PsZ7rlx44gjWpT3+cbjCOptIL8NXB7tgEP3/ XcPR78HlND7L+IPtodl+EKG1Fg6Lm7gS1yXkIcEyomOcDzYPRSpMTg= Received: (qmail 4202 invoked by alias); 30 Oct 2013 22:50:58 -0000 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 Received: (qmail 4193 invoked by uid 89); 30 Oct 2013 22:50:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f177.google.com Received: from mail-ob0-f177.google.com (HELO mail-ob0-f177.google.com) (209.85.214.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 30 Oct 2013 22:50:50 +0000 Received: by mail-ob0-f177.google.com with SMTP id vb8so2183104obc.22 for ; Wed, 30 Oct 2013 15:50:49 -0700 (PDT) X-Received: by 10.60.144.230 with SMTP id sp6mr46203oeb.29.1383173448786; Wed, 30 Oct 2013 15:50:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.24.201 with HTTP; Wed, 30 Oct 2013 15:50:08 -0700 (PDT) In-Reply-To: <526FD06B.2060103@redhat.com> References: <526FD06B.2060103@redhat.com> From: Steven Bosscher Date: Wed, 30 Oct 2013 23:50:08 +0100 Message-ID: Subject: Re: patch to improve register preferencing in IRA and to *remove regmove* pass To: Vladimir Makarov Cc: gcc-patches X-IsSubscribed: yes On Tue, Oct 29, 2013 at 4:12 PM, Vladimir Makarov wrote: > Tomorrow I'd like commit the following patch. > > The patch removes regmove pass. I can barely hold my tears... of joy :-) Attached patch cleans up some left-overs. Nothing to test, really, as it's just comments and NOPs. OK for trunk? Ciao! Steven * gcse.c (pre_delete): Remove references to regmove from comments. * recog.c: (validate_replace_rtx_1): Likewise. * config/rl78/rl78.c: Likewise. * config/v850/v850.h: Likewise, and remove unused ENABLE_REGMOVE_PASS. * common/config/m32r/m32r-common.c: Don't manipulate OPT_fregmove. * common/config/mmix/mmix-common.c: Likewise. Index: gcse.c =================================================================== --- gcse.c (revision 204231) +++ gcse.c (working copy) @@ -2535,7 +2535,7 @@ gcse_emit_move_after (rtx dest, rtx src, rtx insn) /* Delete redundant computations. Deletion is done by changing the insn to copy the `reaching_reg' of the expression into the result of the SET. It is left to later passes - (cprop, cse2, flow, combine, regmove) to propagate the copy or eliminate it. + to propagate the copy or eliminate it. Return nonzero if a change is made. */ Index: recog.c =================================================================== --- recog.c (revision 204231) +++ recog.c (working copy) @@ -726,7 +726,7 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to /* Call ourself recursively to perform the replacements. We must not replace inside already replaced expression, otherwise we get infinite recursion for replacements like (reg X)->(subreg (reg X)) - done by regmove, so we must special case shared ASM_OPERANDS. */ + so we must special case shared ASM_OPERANDS. */ if (GET_CODE (x) == PARALLEL) { @@ -762,6 +762,7 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to if (num_changes == prev_changes) return; + /* ??? The regmove is no more, so is this aberration still necessary? */ /* Allow substituted expression to have different mode. This is used by regmove to change mode of pseudo register. */ if (fmt[0] == 'e' && GET_MODE (XEXP (x, 0)) != VOIDmode) Index: config/rl78/rl78.c =================================================================== --- config/rl78/rl78.c (revision 204231) +++ config/rl78/rl78.c (working copy) @@ -1894,8 +1894,8 @@ post-reload optimizers could operate on the real r tried that there were some issues building the target libraries. During devirtualization, a simple register move optimizer is run. It -would be better to run a full CSE/propogation pass on it through, or -re-run regmove, but that has not yet been attempted. +would be better to run a full CSE/propogation pass on it through, bu +but that has not yet been attempted. */ #define DEBUG_ALLOC 0 Index: config/v850/v850.h =================================================================== --- config/v850/v850.h (revision 204231) +++ config/v850/v850.h (working copy) @@ -954,10 +954,6 @@ extern tree GHS_current_section_names [(int) COUNT #define FILE_ASM_OP "\t.file\n" -/* Enable the register move pass to improve code. */ -#define ENABLE_REGMOVE_PASS - - /* Implement ZDA, TDA, and SDA */ #define EP_REGNUM 30 /* ep register number */ Index: common/config/m32r/m32r-common.c =================================================================== --- common/config/m32r/m32r-common.c (revision 204231) +++ common/config/m32r/m32r-common.c (working copy) @@ -29,7 +29,6 @@ static const struct default_options m32r_option_optimization_table[] = { { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, - { OPT_LEVELS_1_PLUS, OPT_fregmove, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } }; Index: common/config/mmix/mmix-common.c =================================================================== --- common/config/mmix/mmix-common.c (revision 204231) +++ common/config/mmix/mmix-common.c (working copy) @@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see static const struct default_options mmix_option_optimization_table[] = { - { OPT_LEVELS_1_PLUS, OPT_fregmove, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } };