From patchwork Tue Jan 14 20:42:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 310869 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7DC052C0079 for ; Wed, 15 Jan 2014 07:42:23 +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 :message-id:date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; q=dns; s=default; b=Pq9Yqu4mOtya1F6K WWRjJdDVm2Eyw2IMwk0PVGgJIhC4DnvF3KINe6pNxUnzo9njzegnJlY5ZwdhWdco R6/B+2dqx3BJZWpgHyAG4uR6GNDJsOnTVQS7Cyd2pB5gARRR3uVl0GVQruYAl48W QEVtfyVZNAmeNuC+AvcfpZD4Q5g= 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 :message-id:date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; s=default; bh=gL0d2qgRh8v/nwTewlf1xj 79ooY=; b=N27Zk+oZZmDs6PJ9T3yDT3LI7CDgKZhWba84G+AdfiznBFIg8hatGL KIse2CLq4anFL6UA5nEsq4ZAGD93bU0xOQU6pLDrbrUjgUp4oKV11u/zWCFAyPBx rMibROsyR9fmARPbD01SjoQ96NhWWo47qam5lZ5cAFMJ2c4CW2XMg= Received: (qmail 13450 invoked by alias); 14 Jan 2014 20:42:16 -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 13439 invoked by uid 89); 14 Jan 2014 20:42:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e37.co.us.ibm.com Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 14 Jan 2014 20:42:15 +0000 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Jan 2014 13:42:13 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 Jan 2014 13:42:11 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 0BDC719D803E for ; Tue, 14 Jan 2014 13:42:02 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08027.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0EKfxOL5177760 for ; Tue, 14 Jan 2014 21:41:59 +0100 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0EKgAsa006412 for ; Tue, 14 Jan 2014 13:42:10 -0700 Received: from pthw510.ibm.com (nh65100.mts.ibm.com [9.50.17.166] (may be forged)) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s0EKg9Kh006378; Tue, 14 Jan 2014 13:42:10 -0700 Message-ID: <52D5A121.3070506@linux.vnet.ibm.com> Date: Tue, 14 Jan 2014 14:42:09 -0600 From: Pat Haugen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: GCC Patches CC: David Edelsohn , Ulrich Weigand Subject: [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14011420-7164-0000-0000-0000051E3C7B X-IsSubscribed: yes This patch fixes a problem where the attribute no_instrument_function was being ignored and profile code was emitted. Testcase gcc.target/powerpc/ppc64-abi-2.c exposed the issue. Bootstrap/regtest with no new regressions, ok for trunk? -Pat 2014-01-13 Pat Haugen * config/rs6000/rs6000.c (rs6000_output_function_prologue): Check if current procedure should be profiled. Index: config/rs6000/rs6000.c =================================================================== --- config/rs6000/rs6000.c (revision 206602) +++ config/rs6000/rs6000.c (working copy) @@ -23198,7 +23198,7 @@ rs6000_output_function_prologue (FILE *f /* Output -mprofile-kernel code. This needs to be done here instead of in output_function_profile since it must go after the ELFv2 ABI local entry point. */ - if (TARGET_PROFILE_KERNEL) + if (TARGET_PROFILE_KERNEL && crtl->profile) { gcc_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2); gcc_assert (!TARGET_32BIT);