From patchwork Thu Oct 11 15:35:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 190931 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 A8C2A2C008A for ; Fri, 12 Oct 2012 02:42:10 +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=1350574931; 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=99TANY0 E9eysGFBOWdPkIR1NJlk=; b=yWTIOTLCdnK99+kIdhUvf8MKij2F7PDMMqIdmpq 7AkEJxRuETkDH2Rhj0LMDDWIbbERqZAt591ZF6Os+ytZBzgYMvyrpBQsDxLq0BZP SJF9q2AUTWz2TE3Nud7KEhHEFYicDBdHd7QjTcyp0hDNaTuRoQ3LUHW8Fuz4e02n FTmw= 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=TeW2ZyUMjrH9bcbPAEr4PNy3tx+7rQP0AwjFxbZuZ9Zs+9uaXFN1sEs49J2oWy U8evWgNi6TpIDPRwlxGPauUT6yH4QodElOUHDOckaHEMfxBLkVBfSJydK4NwxIrw 5pScajR/r7qZ68UtHlO/obRbxaFWkf6pqntDFkKiEm4mI=; Received: (qmail 14962 invoked by alias); 11 Oct 2012 15:41:51 -0000 Received: (qmail 14924 invoked by uid 22791); 11 Oct 2012 15:41:50 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, MAY_BE_FORGED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Thu, 11 Oct 2012 15:41:44 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9BFfh0J004972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Oct 2012 11:41:43 -0400 Received: from toll.usersys.redhat.com (unused [10.15.16.165] (may be forged)) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9BFfg7K015551 for ; Thu, 11 Oct 2012 11:41:43 -0400 Message-ID: <5076E75B.2000206@redhat.com> Date: Thu, 11 Oct 2012 11:35:55 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: gcc-patches Subject: [lra] patch to fix GCC crash on a SPEC2006 test 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 scheduler crash on a SPEC2006 test because LRA did not process CALL_INSN_FUNCTION_USAGE. The patch was successfully bootstrapped and tested on x86/x86-64. Committed as rev. 192362. 2012-10-11 Vladimir Makarov * lra-spills.c (spill_pseudos): Process CALL_INSN_FUNCTION_USAGE too. Index: lra-spills.c =================================================================== --- lra-spills.c (revision 192341) +++ lra-spills.c (working copy) @@ -480,6 +480,8 @@ spill_pseudos (void) if (bitmap_bit_p (&changed_insns, INSN_UID (insn))) { remove_pseudos (&PATTERN (insn), insn); + if (CALL_P (insn)) + remove_pseudos (&CALL_INSN_FUNCTION_USAGE (insn), insn); if (lra_dump_file != NULL) fprintf (lra_dump_file, "Changing spilled pseudos to memory in insn #%u\n", @@ -488,6 +490,12 @@ spill_pseudos (void) if (lra_reg_spill_p || targetm.different_addr_displacement_p ()) lra_set_used_insn_alternative (insn, -1); } + else if (CALL_P (insn)) + /* Call insn might have not references for pseudos besides + in CALL_INSN_FUNCTION_USAGE but we don't count them in + insn_bitmap of corresponding lra_reg_info as they don't + need reloads. */ + remove_pseudos (&CALL_INSN_FUNCTION_USAGE (insn), insn); bitmap_and_compl_into (DF_LR_IN (bb), &spilled_pseudos); bitmap_and_compl_into (DF_LR_OUT (bb), &spilled_pseudos); }