From patchwork Wed Nov 13 14:48:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 290957 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4D11D2C0092 for ; Thu, 14 Nov 2013 01:49:00 +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 :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=rV1Po7tAO9ThsPZDyzrJ1449pJbkyUWqkp8X2Wxwi92 tbs+hHiDRFp+r2ZojUpCeokvr3k42KHkm/9VTYKLHBPINx7dOxmqg36TxypMkcA4 9C8L3IC7EqCNVTvQ9BZcSbYS0glAb5BiQFFPYhqfMeIsUO6A+gL7wNv0SQpX0qmo = 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=rkBURATUOQw1cgXXhxUR+MEvWnQ=; b=FowgrtP9knonstB8a roEtQCIfjv/622MLyW+bP2wfeKi21SIEgeEj0nXLXXDX8ebi3sXFOtKRYYuKPHvO H8bO+G2z7Vxo3+/lC/45V2vGbfdTNoYl7oMAQws20ZYWNZV8ilFKtJbg/RgjrBSF gyf+pYAnNnEwlgE/uTakiWIIVo= Received: (qmail 3520 invoked by alias); 13 Nov 2013 14:48:50 -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 3511 invoked by uid 89); 13 Nov 2013 14:48:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RDNS_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qc0-f179.google.com Received: from Unknown (HELO mail-qc0-f179.google.com) (209.85.216.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 13 Nov 2013 14:48:49 +0000 Received: by mail-qc0-f179.google.com with SMTP id k18so287264qcv.10 for ; Wed, 13 Nov 2013 06:48:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc :content-type; bh=uh8K/wwmlLm9zV4NXJZJ9/gaZZCyHTg0JsFI5ytmx7k=; b=EPD+Rk4tYzaqobuRwyXT6QxCojMV3MXo4OS0pbvFawAhpH8Jwq6gYJVClKuimZmJ/C NDC8KlHfyI127kfPs1pxHxk2UnP2PS4hdtX441j1LBHWn/mEpO5LacQFDb09jV7ckryw XdSoN1h7oDng7+tHJ9GQlpnnZ1jbQRjnwuk6I8HIaMxcmIOwiJhq8MuwEjdaftOk3yp0 4j0bHq+vtmWWSgsjWdZnh/zTn4dhQNkx3FjzkORscqxUZpzb3SDI0v41OOWsFJrGnPxG GYzUBozTXItV35a+A3Uh2aXnI3/M+tZhlZmR9MYkwGXHGjWDxNzwVd6MEdWE7fZs9j1+ vSIg== X-Gm-Message-State: ALoCoQm/E1mcGLGEyyuBIOK6dJ1AB80Kocb3ookOR4uWasUIp8wrHRbzr3GOT5jQfx8R2MJC308EorP/GVvoSwVVR2tZs8QWusNqW7tSwHjqRPNflaNvts3Di+jAagCcaR294CxGWElq6IqnoLkQiQBSYH1sEui16pmvtB2ouqlLZ2kstukg7wxhg0IGlWjUFZCdaIemPBLxmFpHDjEsSApWRMGhs2OvEw== MIME-Version: 1.0 X-Received: by 10.49.51.103 with SMTP id j7mr65863240qeo.29.1384354120965; Wed, 13 Nov 2013 06:48:40 -0800 (PST) Received: by 10.229.117.69 with HTTP; Wed, 13 Nov 2013 06:48:40 -0800 (PST) Date: Wed, 13 Nov 2013 06:48:40 -0800 Message-ID: Subject: [PATCH] Fix PR ipa/58862 (overflow in edge_badness computation) From: Teresa Johnson To: "gcc-patches@gcc.gnu.org" Cc: Uros Bizjak , David Li , Jan Hubicka X-IsSubscribed: yes The following fixes PR ipa/58862, which caused failures in lto profiledbootstrap and in several spec cpu2006 profile-use builds. Bootstrapped and tested on x86-64-unknown-linux-gnu. Also ensured that it fixed the lto profiledbootstrap and cpu2006 failures. Ok for trunk? Thanks, Teresa 2013-11-13 Teresa Johnson PR ipa/58862 * ipa-inline.c (edge_badness): Fix overflow. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 204703) +++ ipa-inline.c (working copy) @@ -909,7 +909,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) /* Capping edge->count to max_count. edge->count can be larger than max_count if an inline adds new edges which increase max_count after max_count is computed. */ - int edge_count = edge->count > max_count ? max_count : edge->count; + gcov_type edge_count = edge->count > max_count ? max_count : edge->count; sreal_init (&relbenefit_real, relbenefit, 0); sreal_init (&growth_real, growth, 0);