From patchwork Wed Jan 4 09:12:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 134242 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 BEB761007D8 for ; Wed, 4 Jan 2012 20:13:09 +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=1326273190; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=iFmJWZS F/Y8mhSkLzXY1nMyEMXs=; b=HEnZcNFmznK346HM5PVrmD86SCpnbOgqKpd2bXy MvoQIddb3tYlY0ncEAaGGeWH6YspHgpDzNDYRLlc4oPQN8SzEEvtXL2dmRu9L6RF +ZCFWGDPM8vUL6oD/CAJBX5wyq2/R/q7H20D+V8kG2kftjMuCvB0F5vee9TCfceR DwuE= 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:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:X-System-Of-Record:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=RhULw1zH10yc/dxhCk07VpuDXc1zUluzgduI5j/awIj0MK7iHy+bhuLT937Kzf LLuTpnQ/odDGrsK+FkoWUuKWdJFJJw3M7DzFxiAcmU10Fu/+K9LwVl5IgHJ0AA6M YGzyjyM01j/T2tD5t7Cu0IEBXQeVeTTEcn/ILxP3hhib0=; Received: (qmail 9110 invoked by alias); 4 Jan 2012 09:13:05 -0000 Received: (qmail 9092 invoked by uid 22791); 4 Jan 2012 09:13:04 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, TW_CP X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Jan 2012 09:12:51 +0000 Received: by iakh37 with SMTP id h37so29838042iak.20 for ; Wed, 04 Jan 2012 01:12:50 -0800 (PST) Received: by 10.42.131.136 with SMTP id z8mr39463744ics.5.1325668370816; Wed, 04 Jan 2012 01:12:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.131.136 with SMTP id z8mr39463738ics.5.1325668370662; Wed, 04 Jan 2012 01:12:50 -0800 (PST) Received: by 10.50.23.70 with HTTP; Wed, 4 Jan 2012 01:12:50 -0800 (PST) Date: Wed, 4 Jan 2012 17:12:50 +0800 Message-ID: Subject: [google] Dump inline decisions more wisely From: Dehao Chen To: gcc-patches@gcc.gnu.org X-System-Of-Record: true 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, This patch: * dump inline decisions with profile info whenever available. * disable dump of einline decisions at OPT_INFO_MIN. Is it ok for google branches? thanks, Dehao 2012-01-04 Dehao Chen * ipa-inline.c (cgraph_node_opt_info): Print profile info if available (dump_inline_decision): Disable einline dump at OPT_INFO_MIN Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 182864) +++ gcc/ipa-inline.c (working copy) @@ -308,12 +308,12 @@ bfd_name = "unknown"; buf_size = strlen (bfd_name) + 1; - if (flag_opt_info >= OPT_INFO_MED && profile_info) + if (profile_info) buf_size += (2 * MAX_INT_LENGTH + 5); buf = (char *) xmalloc (buf_size); strcpy (buf, bfd_name); - if (flag_opt_info >= OPT_INFO_MED && profile_info) + if (profile_info) sprintf (buf, "%s ("HOST_WIDEST_INT_PRINT_DEC", "HOST_WIDEST_INT_PRINT_DEC")", buf, node->count, node->max_bb_count); @@ -364,6 +364,16 @@ const char *call_count_text; struct cgraph_node *final_caller = edge->caller; + if (flag_opt_info < OPT_INFO_MED) + { + tree decl = edge->caller->decl; + if (decl) + { + struct function *fn = DECL_STRUCT_FUNCTION (decl); + if (!fn || !fn->always_inline_functions_inlined) + return; + } + } if (final_caller->global.inlined_to != NULL) inline_chain_text = cgraph_node_call_chain (final_caller, &final_caller); else