From patchwork Wed Aug 8 14:10:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 175932 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 A5AF02C0081 for ; Thu, 9 Aug 2012 00:14:48 +1000 (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=1345040088; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=qPYcwcu v65Ocv/IMpPqBe7DOmOE=; b=WCx0K96h5PzUqzZQ2M2CoE6jdvaRQJ6qnUCMsFa D0NFADlr4izJHkfay3OxVBZIRrwOBXeM2N4vDl+beOkLOs6rw9VHJjktH1DSfFWq pDnTHDFSxfjMgzbK0yS22zGDUCvLg2gSLHlLzoYypaE9kiEaLctvnBVci9WtcjZQ tVh4= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=M3xrAP2lX+VFJsrHcE4yJzSyBPN1q0pE5O6crehWgKONArwQrIjsfW8CVEKm0F 5XFLRzr/dQvvi/OJOMYrDh2EsEwmaUy2RWEDJU88k30sjl7G1msyv4HqLwsuOEv0 d6MrVxhPWr+o9vQutIunc65cw0nQc/iPqnqo4SRm0KBxw=; Received: (qmail 16891 invoked by alias); 8 Aug 2012 14:14:44 -0000 Received: (qmail 16878 invoked by uid 22791); 8 Aug 2012 14:14:42 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, MAY_BE_FORGED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 14:14:27 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q78EERdn005023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 8 Aug 2012 10:14:27 -0400 Received: from toll.usersys.redhat.com (unused [10.15.16.165] (may be forged)) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q78EEQP2028141 for ; Wed, 8 Aug 2012 10:14:26 -0400 Message-ID: <5022734C.6060707@redhat.com> Date: Wed, 08 Aug 2012 10:10:20 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: gcc-patches Subject: [lra] patch to fix a ppc64 gcc testsuite failure X-IsSubscribed: yes 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 The following patch fixes a ppc64 gcc testsuite failure. The patch was successfully bootstrapped on x86/x86-64. Committed as rev. 190207. 2012-08-07 Vladimir Makarov * lra-int.h (lra_constraint_iter_after_spill): New. * lra.c (lra): Initialize lra_constraint_iter_after_spill. * lra-constraints.c (lra_constraint_iter_after_spill): New. (lra_constraints): Use lra_constraint_iter_after_spill. Index: lra.c =================================================================== --- lra.c (revision 190127) +++ lra.c (working copy) @@ -2118,7 +2118,8 @@ lra (FILE *f) COPY_HARD_REG_SET (lra_no_alloc_regs, ira_no_alloc_regs); lra_live_range_iter = lra_coalesce_iter = 0; - lra_constraint_iter = lra_inheritance_iter = lra_undo_inheritance_iter = 0; + lra_constraint_iter = lra_constraint_iter_after_spill = 0; + lra_inheritance_iter = lra_undo_inheritance_iter = 0; setup_reg_spill_flag (); @@ -2214,6 +2215,7 @@ lra (FILE *f) lra_constraint_new_regno_start = max_reg_num (); lra_constraint_new_insn_uid_start = get_max_uid (); bitmap_clear (&lra_matched_pseudos); + lra_constraint_iter_after_spill = 0; } restore_scratches (); lra_eliminate (true); Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 190127) +++ lra-constraints.c (working copy) @@ -3460,8 +3460,8 @@ debug_loc_equivalence_change_p (rtx *loc return result; } -/* Maximum number of constraint pass iteration number. It is for - preventing all LRA cycling. */ +/* Maximum number of constraint pass iteration number after the last + spill pass. It is for preventing all LRA cycling. */ #define MAX_CONSTRAINT_ITERATION_NUMBER 15 /* Maximum number of generated reload insns per an insn. It is for @@ -3471,6 +3471,10 @@ debug_loc_equivalence_change_p (rtx *loc /* The current iteration number of this LRA pass. */ int lra_constraint_iter; +/* The current iteration number of this LRA pass after the last spill + pass. */ +int lra_constraint_iter_after_spill; + /* True if we substituted equiv which needs checking register allocation correctness because the equivalent value contains allocatiable hard registers or when we restore multi-register @@ -3492,7 +3496,8 @@ lra_constraints (bool first_p) if (lra_dump_file != NULL) fprintf (lra_dump_file, "\n********** Local #%d: **********\n\n", lra_constraint_iter); - if (lra_constraint_iter > MAX_CONSTRAINT_ITERATION_NUMBER) + lra_constraint_iter_after_spill++; + if (lra_constraint_iter_after_spill > MAX_CONSTRAINT_ITERATION_NUMBER) internal_error ("Maximum number of LRA constraint passes is achieved (%d)\n", MAX_CONSTRAINT_ITERATION_NUMBER); Index: lra-int.h =================================================================== --- lra-int.h (revision 190127) +++ lra-int.h (working copy) @@ -296,6 +296,7 @@ extern rtx lra_secondary_memory[NUM_MACH extern int lra_constraint_offset (int, enum machine_mode); extern int lra_constraint_iter; +extern int lra_constraint_iter_after_spill; extern bool lra_risky_transformations_p; extern int lra_inheritance_iter; extern int lra_undo_inheritance_iter;