From patchwork Fri May 3 16:23:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 241347 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 396762C00DF for ; Sat, 4 May 2013 02:24:08 +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:date :to:subject:mime-version:content-type:content-transfer-encoding :message-id:from; q=dns; s=default; b=ftpFKl9im3s/lEmXkhOafX9WM5 5PcqnXtzyLKd7S8X2DO9AJ5eMce68NEpjjtwArtJdBaHo6qLoidZSZ/yew4J1YY7 A0l4taHo19TSageUJ3wiuw1PXRG1zX9TzQISLYPOu/uYts2EhRQyKOUxzn2epbXQ bj0M2SurApqTAsBzg= 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:date :to:subject:mime-version:content-type:content-transfer-encoding :message-id:from; s=default; bh=LOmXcAHU20mO1HcMn1FY51AVZJI=; b= O1CXZoYZeZWKCQdkU2weHOsr8ZVY1jZKTwHCLP5Hgze645yMXNdXdymOVre+JyuB av+Qy8I5tBfF6J+uTU/pCVGoILFRRmS9ToW3Z1WBvKDSutAyVg7DoUmCfDw75az1 0wI7GufkyCXbT2pxiR/ZL69neSPIQb1FcecNV22lnWg= Received: (qmail 10190 invoked by alias); 3 May 2013 16:24:02 -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 10181 invoked by uid 89); 3 May 2013 16:24:01 -0000 X-Spam-SWARE-Status: No, score=-4.5 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-gg0-f202.google.com (HELO mail-gg0-f202.google.com) (209.85.161.202) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 03 May 2013 16:24:01 +0000 Received: by mail-gg0-f202.google.com with SMTP id 4so186517ggm.5 for ; Fri, 03 May 2013 09:23:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:to:subject:user-agent:mime-version:content-type :content-transfer-encoding:message-id:from:x-gm-message-state; bh=kiSAm7HUf8k/VyYeP4s3qSUPFl6Xx440+G6a7Q7LSiU=; b=IT/joZwal4sJGIS5BJSuaC9U7MsgAu2euSyWv1RS0j7xwhBQYJS2Aj1ES7ldQmtcZ6 iUvjmhLODUscp2BOnkqTo1lfwqZ2XGJ6wPKEaiBlxEGIGS831XlUTFDmdXFsssElPQV8 yTJtAbGxoIxK5a1TJi3d1Q4zo/0VxR0d5HzZKKgAR6gnaErK1CZvZQ3Wc6HrGJdgT8qs ohne2Yu7niverhhsiXMnQcolYb6kW2ibGajpnTjtSOD+m3HsA4CSLGlzS3/c6h78SAj/ eUeo2f1TcHa33N/Vzcy1V6fBavigJUOD9sr+3ORrf5hJue3+P8mx27PgCu7+I6JTYOeJ 08rw== X-Received: by 10.236.210.114 with SMTP id t78mr8478057yho.29.1367598239349; Fri, 03 May 2013 09:23:59 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id k33si631054yhi.3.2013.05.03.09.23.59 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 03 May 2013 09:23:59 -0700 (PDT) Received: from tjsboxrox.mtv.corp.google.com (tjsboxrox.mtv.corp.google.com [172.17.129.49]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 3746D31C0AC; Fri, 3 May 2013 09:23:59 -0700 (PDT) Received: by tjsboxrox.mtv.corp.google.com (Postfix, from userid 147431) id AFD3F80BD0; Fri, 3 May 2013 09:23:58 -0700 (PDT) Date: Fri, 03 May 2013 09:23:58 -0700 To: gcc-patches@gcc.gnu.org, reply@codereview.appspotmail.com Subject: [PATCH] Fix PR bootstrap/57154 (issue9179043) User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-Id: <20130503162358.AFD3F80BD0@tjsboxrox.mtv.corp.google.com> From: tejohnson@google.com (Teresa Johnson) X-Gm-Message-State: ALoCoQknp3opiajCXcHryMXTJWjSNjaYypzChyFSfN12VwDdc2GARPGekWydYorPraxSiYjueW10EcD0EL1/1avZd+IIoqhF6aQYOZoxfIU1IuIK+xumvWjDqiH757bguVRZmk0O3pDJ/HgNA6SqifObyO3kh4UpH1h/5FyH2qDZOaJTEXG4g+Mh0dbfCQPLTYotTr81rOm4 This patch fixes PR bootstrap/57154. Bootstrapped on powerpc64-linux to ensure it fixes the bootstrap problem reported for that architecture, and also the test case attached to the bug report. Also bootstrapped and regtested on x86_64-unknown-linux-gnu. Ok for trunk? Thanks, Teresa 2013-05-03 Teresa Johnson PR bootstrap/57154 * sched-rgn.c (compute_dom_prob_ps): Ensure accumulated probabilities do not exceed REG_BR_PROB_BASE. --- This patch is available for review at http://codereview.appspot.com/9179043 Index: sched-rgn.c =================================================================== --- sched-rgn.c (revision 198532) +++ sched-rgn.c (working copy) @@ -1442,6 +1442,12 @@ compute_dom_prob_ps (int bb) bitmap_set_bit (pot_split[bb], EDGE_TO_BIT (out_edge)); prob[bb] += combine_probabilities (prob[pred_bb], in_edge->probability); + // The rounding divide in combine_probabilities can result in an extra + // probability increment propagating along 50-50 edges. Eventually when + // the edges re-merge, the accumulated probability can go slightly above + // REG_BR_PROB_BASE. + if (prob[bb] > REG_BR_PROB_BASE) + prob[bb] = REG_BR_PROB_BASE; } bitmap_set_bit (dom[bb], bb);