From patchwork Tue Jun 4 16:51:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 248713 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id BEF082C0082 for ; Wed, 5 Jun 2013 02:51:50 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=HUIGrFur5S8vtlLvBz aPt4S92tOYnCPZ4ImRfSb3E7m2jUNrB9bbITTySk7m+kvMvo2TGFiUgWNKBaMer3 vu2VvF4ldKnzvz5wxvONhRtb08Xu/CufrdOsxovw8p/N3E1kLR280JUVWKwhxj9X It+pXfXUrFv6jKRW5c1SYHs1Q= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=1iYq840M8HSEi3MpzqomCeLl P54=; b=UH8AxAgZsQTIsTuSDkC45HC8KFzdOs3bvfo5MDmp/rAkZzNNvZ8cbFP3 eJX9es819TLtQN0VlF9UP0A9xFl/b4bf4PFuyBHW22BulwOZZXRZVT8IZ//nI7su VxxcqAxCSprcYuGrPKh0+ONG8ymmStYx9U5DuX38CpqguVbEzQI= Received: (qmail 17502 invoked by alias); 4 Jun 2013 16:51:45 -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 17462 invoked by uid 89); 4 Jun 2013 16:51:39 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ea0-f170.google.com (HELO mail-ea0-f170.google.com) (209.85.215.170) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 04 Jun 2013 16:51:38 +0000 Received: by mail-ea0-f170.google.com with SMTP id h10so386765eaj.29 for ; Tue, 04 Jun 2013 09:51:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=am5RUxzFHGnfAXSzu9VrrWicx4SeKDNL5fxTRZyHCr0=; b=YsFt7jrRYcl+JXLOP8dOdD4epCGdruCC0R3DYrC3PKmWzJm7CWRRe7d4qzr1g6QUAJ 8h7978zVto9xMGsB4vpfRAw6B2tD1UsTCupO7FfgA8GAE4JSLCjs1HT2/JV5a5mWT4fS 4j/+LXFQO3mIzTOHg0MlqEQBXryMiwvVRSP0RaMo3n5ubNpU28TWYsg/AvZHThFN/w7d Nl1S/QknrDwNta7IkO6N+/uH93mVbVsHJvNxKKgvVO8Vfg/RB8mVtV8l3VOBl6qcC68o oJby/SGvybuW0Dtw4ZGqaA/T6Y8VBPzVFg86OvFdf3bMZFgQRp5c4wRcYlgpdor3h9/f jNUQ== MIME-Version: 1.0 X-Received: by 10.15.36.72 with SMTP id h48mr9408777eev.33.1370364696248; Tue, 04 Jun 2013 09:51:36 -0700 (PDT) Received: by 10.14.220.9 with HTTP; Tue, 4 Jun 2013 09:51:36 -0700 (PDT) In-Reply-To: References: Date: Tue, 4 Jun 2013 09:51:36 -0700 Message-ID: Subject: Re: [GOOGLE] Unrestrict early inline restrictions for AutoFDO From: Dehao Chen To: Xinliang David Li Cc: GCC Patches , Teresa Johnson X-Gm-Message-State: ALoCoQmDQIy7+G8xLX9CSXBeBFKeW60KLnB++xfWH9TkrvcicAeCtyOoesuAHn8O4cfYhjvGiUHT97ZaRZInYsbIMeSnVWoato12XKquBtsNFu86hhT3Re+yhEjre2PXq2zIXAS5MHw0nYT/+KrYtRMAIOK4PQYFPkzzmy0c6FFMxPYK4Lkti0ebk8m/1zCBoxR8OqslOyrX Patch updated to set the iteration threshold to 10 for AutoFDO. Performance test shows ok. OK for google-4_8 branch? Thanks, Dehao Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 199593) +++ gcc/ipa-inline.c (working copy) @@ -2161,8 +2161,7 @@ early_inliner (void) { /* We iterate incremental inlining to get trivial cases of indirect inlining. */ - while ((flag_auto_profile - || iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)) + while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS) && early_inline_small_functions (node)) { timevar_push (TV_INTEGRATION); Index: gcc/opts.c =================================================================== --- gcc/opts.c (revision 199593) +++ gcc/opts.c (working copy) @@ -784,6 +784,10 @@ finish_options (struct gcc_options *opts, struct g opts->x_param_values, opts_set->x_param_values); } + if (opts->x_flag_auto_profile) + maybe_set_param_value (PARAM_EARLY_INLINER_MAX_ITERATIONS, 10, + opts->x_param_values, opts_set->x_param_values); + if (opts->x_flag_lto) { #ifdef ENABLE_LTO