From patchwork Wed May 29 16:39:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 247324 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 D83622C02BD for ; Thu, 30 May 2013 02:39:12 +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:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=BGhaBIJ88ltoFG8GAWlUTtAfpNJKCn8zCtvSyQ9/F0d J+HQy9/+GemmnLseQ91GzwujbQ58h/91G1XYaTubYp0B6pCtTHEmK5m+ylfjRVXW UqLoz3C4f5CP0m0G3evH7wlDZdMYb3dpzzw5sAmLJ/iFpE8pJr3QsZFXfSa9OpEA = 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:date:message-id:subject:from:to:cc:content-type; s=default; bh=Qn4EgW0WJrxokyTp5TSjkAEdwfo=; b=YyDEB57Wkj/nPC0to tL7aPNoWltzjSxqk5cyDUYSsACn/hLrNb8lUsUBHFUZIUNIXovlZuCDlF7ICac1v Y6IZL16g9xa7QcvVQg/3oMeC+onFmxAgxHW640O27KK7E4VI8hZcIPwrN4aGyW7t YZwoZxkWDbnE4nV0uYjj8hDjDM= Received: (qmail 13240 invoked by alias); 29 May 2013 16:39:06 -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 13229 invoked by uid 89); 29 May 2013 16:39:06 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ee0-f50.google.com (HELO mail-ee0-f50.google.com) (74.125.83.50) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 29 May 2013 16:39:05 +0000 Received: by mail-ee0-f50.google.com with SMTP id c41so5531600eek.37 for ; Wed, 29 May 2013 09:39:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=QHwr1d24bOj5WWOdpZ1EveIhhNRyQ6SBRjReIQFf8Ak=; b=DcZl9KaCwK71pRqAW7EsgckXTJuoznnkungjS0VooOMDWqf+cpJkizHfwCv3o/afCs KjTfdt/nbVE9WeIqNCQCVEjh0vId4Dl1rWwyArGOzQSv2BmOMe9qJ2Dtit/V2q01JqU5 umaI9t9TmSlDMKaIxlLrfBWDwQK+E1qOmMBcSE7tKhkhwZ5SdbeX8ssuHdDARxjsyAuN wYXOav+lz1H6yf2apDair4VAtcPEopsNQqmWXs+4Hy0myuyK4E2+gEYHGyoDyKfThzU7 ZyulgJ5UsB3nx8Y2KHxybaFHWXmawslf9yP8nfbgw0HU7FvU+qqbC/U/60FV9hLnA8Cp xVbQ== MIME-Version: 1.0 X-Received: by 10.15.43.71 with SMTP id w47mr4699107eev.32.1369845543127; Wed, 29 May 2013 09:39:03 -0700 (PDT) Received: by 10.14.134.70 with HTTP; Wed, 29 May 2013 09:39:03 -0700 (PDT) Date: Wed, 29 May 2013 09:39:03 -0700 Message-ID: Subject: [GOOGLE] Unrestrict early inline restrictions for AutoFDO From: Dehao Chen To: GCC Patches Cc: David Li X-Gm-Message-State: ALoCoQkPOkbZ/TeckmY7/j4rntUHqvWowYJpDJlRroTbgQoVvIZJGuF2VG0agVCvWqN97lJ4ObspKZ10lyfbjI+B/Txyhy+V/uubCrT8MeHjeofdhP71dMnQ7+/cGSh5RqclHOqRd1g9XT8c7jCoIN4xm/ntirVBbyF3fm21HnIopundoJXp3m2bMEpTMZi1JVPb9kGlfXvt In gcc4-8, the max einline iterations are restricted to 1. For AutoFDO, this is bad because early inline is not size restricted. This patch allows einline to do multiple iterations in AutoFDO. It also enables tracer optimization in AutoFDO. Bootstrapped and passed regression test. OK for googel-4_8? Thanks, Dehao Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 199416) +++ gcc/ipa-inline.c (working copy) @@ -2161,7 +2161,8 @@ early_inliner (void) { /* We iterate incremental inlining to get trivial cases of indirect inlining. */ - while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS) + while ((flag_auto_profile + || 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 199416) +++ gcc/opts.c (working copy) @@ -1644,6 +1644,8 @@ common_handle_option (struct gcc_options *opts, opts->x_flag_peel_loops = value; if (!opts_set->x_flag_value_profile_transformations) opts->x_flag_value_profile_transformations = value; + if (!opts_set->x_flag_tracer) + opts->x_flag_tracer = value; if (!opts_set->x_flag_inline_functions) opts->x_flag_inline_functions = value; if (!opts_set->x_flag_ipa_cp)