From patchwork Wed May 15 14:50:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 244102 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 B771B2C0098 for ; Thu, 16 May 2013 00:50:44 +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=co7A8f1XbiRbKvbp4Sn/2mUyIr S0rI8qpsYa1aI1Npcb1Dt50pv/FesrhVBiIK48OSjre4rkdAfMQb7UBjuQ4M+E9O jqOMsCIiNvAd+wM9ljdsNLR8HeEynCUuWLQ0X3u+JBu7q2IDScfeFZnzNdV97/+e FVsL39L71ecAtmPZI= 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=VmYmCyeOOT06P0b02vnGvOphi7Q=; b= lH65hE+1wZLy2SI/5KPSbnTWxmDP5245sDryxuZt4jSGpjyUnxCnZok69CXDUFe6 0wOp624G7SRCzfu7r040aX36sEx0naI19vsQoH7rVUGNk84wFbeagU8lyzP/gM5n frZnXLI6rb1vo37cCNVKZCrxYBXdC7lo9lEY3UY8sCA= Received: (qmail 27040 invoked by alias); 15 May 2013 14:50:37 -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 27001 invoked by uid 89); 15 May 2013 14:50:36 -0000 X-Spam-SWARE-Status: No, score=-3.6 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-yh0-f73.google.com (HELO mail-yh0-f73.google.com) (209.85.213.73) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 14:50:35 +0000 Received: by mail-yh0-f73.google.com with SMTP id a41so105097yho.4 for ; Wed, 15 May 2013 07:50:33 -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=SErlGgQvTKOE37klH29eVi8V0VwOrpLkPTQwlHc4K3s=; b=S4tDFQiHrhbLOTxNmM/gctbABUITi83AfNYYYfz+LLZG2YEZBjDlhtt/9m7Z6RhyNQ gFebjl3P6FN0mQgVc1GrquZvxpDyWe0wHnk61Q+qmZP4Nem8SBPYKhqxFjKjgSt2GBRi 5pandZgDLQbiNqNP9Ctwz2g+KvckHWV6mTqqjeT5/H4qNFdEXvdytFA1tY1DYqNa8v20 iOB3feYdJLOK966Rj9dEh7leDidA/1lwgBN/dqeTzgbcrxtsdNbMXQThJs+QBth5A0us 5uZpm5H6QTG3pF+pEcGEeR05j5tMx/cqkF+xPyUlmIB6M5Y2rgJxsXOFmNaWYKOwIvF+ ts7Q== X-Received: by 10.236.68.164 with SMTP id l24mr7004307yhd.19.1368629433590; Wed, 15 May 2013 07:50:33 -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 s48si173607yhe.6.2013.05.15.07.50.33 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 15 May 2013 07:50:33 -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 709AF31C19C for ; Wed, 15 May 2013 07:50:33 -0700 (PDT) Received: by tjsboxrox.mtv.corp.google.com (Postfix, from userid 147431) id 16AC5811D6; Wed, 15 May 2013 07:50:32 -0700 (PDT) Date: Wed, 15 May 2013 07:50:32 -0700 To: gcc-patches@gcc.gnu.org Subject: [PATCH] Suppress -fopt-info message for non-unrolled loops User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-Id: <20130515145033.16AC5811D6@tjsboxrox.mtv.corp.google.com> From: tejohnson@google.com (Teresa Johnson) X-Gm-Message-State: ALoCoQlWj1eefKZDAucKvQ2sZz7R0lfdqjr5L9thrYNfhMjxs8bnNGiln6J3ACUz/eOqFC57lxNehXguhgCF5t5lLS4G+oI7bz6lv7Lj5ckbYg5buOMNeGWk3lFcMJ5SSQIgmAZiA/dyL0FvATiEELXR97RPlBVS8hjbsWO9A9MuzcTFM5Rr9iqstDXNrwvMGbHiu4BfDTJmPz2RaeJK6ZVIxaXykExCJM0N1/mtKkCFdIdqfzNLi/4= This patch suppresses -fopt-info messages for loops that were not unrolled/peeled, to avoid emitting "Unroll loop 0 times" messages. Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? 2013-05-15 Teresa Johnson * loop-unroll.c (report_unroll_peel): Check decision before emitting unroll/peel message. Index: loop-unroll.c =================================================================== --- loop-unroll.c (revision 198891) +++ loop-unroll.c (working copy) @@ -212,6 +212,9 @@ report_unroll_peel (struct loop *loop, location_t int niters = 0; int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS; + if (loop->lpt_decision.decision == LPT_NONE) + return; + if (!dump_enabled_p ()) return;