From patchwork Mon Apr 8 03:13:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 234561 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 25D4E2C00C4 for ; Mon, 8 Apr 2013 13:13:55 +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=dBdsHDxtpNkf/1x48d57clnR+nt3Atv0dcTsIHTU5D/ ulXDo5IxYY5nBMx3fdLGYYrOi5fjfO8UkDhrG+CydQQRpNJjOcDmSZzj1jEIR+Pm UYBAAmtkT9Di5nIhtVoTomd2koUdpgVqko/6i8KsIIZv2Y5yoDZlXxz8VTjWd4FU = 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=fcwRfCFJr/V0MO0/KPWRSp/Vt9w=; b=imaSSgadHuhiBVjOr o565FJBEsvcPj79eMy61SAkTbnwLeHZBtWSrS1evLbuHajhXsmTzorY+IfRz6xfR zXmsaNglY67kzKSkLfY2Z3p9B9GNOHpA6itGzyO0GJZfGVkXMWrH+FW/KggkJELY kVMtEJxyphsCalLCCLxzsHtpNc= Received: (qmail 4809 invoked by alias); 8 Apr 2013 03:13:49 -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 4798 invoked by uid 89); 8 Apr 2013 03:13:48 -0000 X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mail-ea0-f172.google.com (HELO mail-ea0-f172.google.com) (209.85.215.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Apr 2013 03:13:48 +0000 Received: by mail-ea0-f172.google.com with SMTP id z7so2025055eaf.17 for ; Sun, 07 Apr 2013 20:13:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type:x-gm-message-state; bh=IPX1TfHd4/xKYdzy7UMJy6DTirgNt8hyFlgV84pEmjs=; b=YgbGLzF9ENuWoSZHfTeXf71CxYj1pkpTJ6vvPMFj7UJrMzvw6t2zAEjtpedCoC7E5Z Io6t0aaWDrkFafusrOBB3crlgr0iqxm1dqsZg2ZnjUm015By2ZDtzNf0IM/YWQLH8W0u qSPPg51y9o+EqRzJDv/diH7KphFUxZtyTytg2YTND55xIchVSxF05wIIcC1fzgaI+jWo uuRSCyLFZz730uZGaKa7j4asDZZIZKkpYKXddkxYKMw+7xbuHaYlfTsBP2SfYaZrh6I4 LlBM+lossrWiIvfjEarIkPuefALbtSVkCxw7Mjn65uTbY3DiaFs7kX3/oUsf1ZKCfb2b g81Q== MIME-Version: 1.0 X-Received: by 10.15.21.1 with SMTP id c1mr43797354eeu.36.1365390826025; Sun, 07 Apr 2013 20:13:46 -0700 (PDT) Received: by 10.14.103.71 with HTTP; Sun, 7 Apr 2013 20:13:45 -0700 (PDT) Date: Sun, 7 Apr 2013 20:13:45 -0700 Message-ID: Subject: [Google] Update all caller edges for AutoFDO invocations From: Dehao Chen To: GCC Patches Cc: David Li X-Gm-Message-State: ALoCoQmXdfzSd1c7MnC+mscAAN4waGCotCjR55t91bfn376l9roegd67HfaS3cgFbpH555hRST3ARZWs4CJoMK4oa6NwnnRMDVsuRq2E9Pfbk6IgmjBVqQoo2ynU8pu+irmJslLqeWcXhAlI3Dd3whTGfVcUaBH2O8zh2Bkmyy9IHo1IMdqB0f/lq98JXxiMelyzuFHtplKs In the current implementation, update_all_callee_keys only invokes update_caller_keys for one edge. For the AutoFDO case, it could cause important edges not being updated because top-down inline pattern is very popular in AutoFDO. This patch ensures all edges are updated in update_caller_keys. Bootstrapped and passed gcc regression tests. Is it okay for google-4_7 branch? Thanks, Dehao else --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1234,7 +1234,8 @@ update_all_callee_keys (fibheap_t heap, struct cgraph_node *node, Reset their caches */ reset_node_growth_cache (callee); if (e->inline_failed) - update_caller_keys (heap, callee, updated_nodes, e); + update_caller_keys (heap, callee, updated_nodes, + flag_auto_profile ? NULL : e); if (e->next_callee) e = e->next_callee;