From patchwork Thu Nov 8 17:42:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 197862 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 DB71E2C00D7 for ; Fri, 9 Nov 2012 05:10:33 +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=1353003035; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=HgDNR4IDp2WLa/GQq1qu rXmW60I=; b=UgohsURkJEuZKxuzWkCpwZKS1gvn3bUwY4be1a+rZ/rYydPWGPHx +itge9Cps8Tq60wTIXm+kvqBDEC4RI+ogsZ3gUoU/Pt/NDEjrH/+/C1jLpB+t/YT hcUnu5VpdJRin0B3JM8BcAAhMt0lVHyl5jZ34N8R3UhxENeiiEOjdG8= 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:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Rxph8uuKILEmBfCg6/i9Om3v2BPYrF92yyqXGx/I2Nw/G74ltJ16VagSBXuSbJ WBJpGilaRutMBkUOSMZ6LhxbbU/fIM2gHE4CKYHDgP44FRGYEIyxe9YzhOhbUoMZ mV2EDmV5QhTkuRdiPIhJxsl5SDhnMfNb2R6GeON9/iEfY=; Received: (qmail 19858 invoked by alias); 8 Nov 2012 17:42:28 -0000 Received: (qmail 19850 invoked by uid 22791); 8 Nov 2012 17:42:26 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, 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, 08 Nov 2012 17:42:20 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA8HgJSb029178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Nov 2012 12:42:19 -0500 Received: from zalov.redhat.com (vpn1-7-97.ams2.redhat.com [10.36.7.97]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA8HgHwR015887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Nov 2012 12:42:19 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qA8HgGZX022347; Thu, 8 Nov 2012 18:42:17 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qA8HgFZh022346; Thu, 8 Nov 2012 18:42:15 +0100 Date: Thu, 8 Nov 2012 18:42:15 +0100 From: Jakub Jelinek To: David Edelsohn Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308) Message-ID: <20121108174215.GC1859@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 Hi! We have in rs6000-protos.h extern bool legitimate_indirect_address_p (rtx, int); and in rs6000.c inline bool legitimate_indirect_address_p (rtx x, int strict) { ... } and in predicates.md call this function. That works fine in C (both -fgnu89-inline mode and C99), the function is inlined within rs6000.c but an out of line copy is still emitted and predicates.md can thus reference it. But in C++, if compiled with optimizations, without -fkeep-inline-functions and the compiler inlines all calls to that function, it doesn't have to emit anything. Thus, either we have the option to move the definition of legitimate_indirect_address_p into a header (but rs6000-protos.h doesn't look like a correct spot to define inline functions), or we need to drop inline keyword and force that way an out of line copy. Ok for trunk? 2012-11-08 Jakub Jelinek PR target/54308 * config/rs6000/rs6000.c (legitimate_indirect_address_p): Remove inline keyword. Jakub --- gcc/config/rs6000/rs6000.c.jj 2012-10-31 09:20:44.000000000 +0100 +++ gcc/config/rs6000/rs6000.c 2012-11-08 18:33:34.950408593 +0100 @@ -5465,7 +5465,7 @@ avoiding_indexed_address_p (enum machine return (TARGET_AVOID_XFORM && VECTOR_MEM_NONE_P (mode)); } -inline bool +bool legitimate_indirect_address_p (rtx x, int strict) { return GET_CODE (x) == REG && INT_REG_OK_FOR_BASE_P (x, strict);