From patchwork Fri May 31 15:46:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 247979 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 ECF5E2C009E for ; Sat, 1 Jun 2013 01:46:26 +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:cc:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= EaGOIUEgFnKNNK3V+a71lf54qsJ+ijmjyOFGmCuX5z58pLI48sLlAH2UunzoFIXg 4NC36Ht48BslgJsWtBe4KwOG26KJv4KOzwv+knSBivbJdf7uFK0k+L+nxrZf7kwN VWTXYjqVusSAK/Tdeod4Oz/aNXIAy0d5Gger6bFKc1M= 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:cc:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=JZiImK VkcNHAKlE/6yf0uxCDivY=; b=E8d19E2BrUKZbHUM39jF68D8zh9MB1UvK1pSdU ElxJtuemFEwPXrO+bZAXAoGJryDAl2BU1098Gz8NzwODv/sJSdw/8OTDk1aUIuIN /dJ+nYb9ewstS55ROW8lh6STcNtiGBOkapubEAmdFxxrJ7KNRbF+F9PrWmdZAJEV YEUtk= Received: (qmail 26761 invoked by alias); 31 May 2013 15:46:19 -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 26748 invoked by uid 89); 31 May 2013 15:46:19 -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-qe0-f73.google.com (HELO mail-qe0-f73.google.com) (209.85.128.73) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 15:46:18 +0000 Received: by mail-qe0-f73.google.com with SMTP id a11so155280qen.2 for ; Fri, 31 May 2013 08:46:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:to:cc:subject:user-agent:mime-version:content-type :content-transfer-encoding:message-id:from:x-gm-message-state; bh=ENqbgQf9PRZXBC4ewNjT2NfV9/TgXACwJp3/+iKsBvw=; b=DniAYYXcODGEXtFS6vb5w4idXGd299sVeTwXNKGkVKkiXXc07UbaGWYU3vMmVrcLRA b8Hcv68Dy4q1oRqAOjYmpiMlYdIUbhms8x2Nbmdj4Jnl9D0wKSqeA+dT7P2IzxGlpKVD TQ1yBuV5GXbF8e961IHkzXc0F/WriQQPFU2I/bxHucx+HZjJMSCZgzLarnUhQx+inPCH VXK6iUvM1nSuv4YWtdL4dLCmDbX3WPIzZuZ8NPaF/Nd6Y+zzjUFdT11D1RxX4Vl1t2J2 YEmLOp1TycMWkDDxQG+dTCERNzUBPSjqnfL89+ABmr2il2iEysa912iTzlGFQJ94yTgQ KwUQ== X-Received: by 10.236.200.229 with SMTP id z65mr6546327yhn.18.1370015176283; Fri, 31 May 2013 08:46:16 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id y4si2284130yhi.3.2013.05.31.08.46.16 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 31 May 2013 08:46:16 -0700 (PDT) Received: from tjsboxrox.mtv.corp.google.com (tjsboxrox.mtv.corp.google.com [172.17.129.49]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 0B85A5A415E; Fri, 31 May 2013 08:46:16 -0700 (PDT) Received: by tjsboxrox.mtv.corp.google.com (Postfix, from userid 147431) id 9B43480800; Fri, 31 May 2013 08:46:15 -0700 (PDT) Date: Fri, 31 May 2013 08:46:15 -0700 To: rguenther@suse.de, gcc-patches@gcc.gnu.org Cc: davidxl@google.com Subject: [PATCH] Reduce -fopt-info verbosity User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-Id: <20130531154615.9B43480800@tjsboxrox.mtv.corp.google.com> From: tejohnson@google.com (Teresa Johnson) X-Gm-Message-State: ALoCoQnEOvDuMga0n0v+FxpAvk7Ukv5hCdLlk/N0O2gqcgtKME9zpLa2eaHRc0JtjfwLbkKSclEU7gbj95wc/j951HbbG7rvvsnEnN1kJBahY3W31AM5kXm/O/ddwcTEi7dsi/vjuIfO7409U+JxWew8EO5hxAeCvn5eFTpMlPe57JmMYv9+2klrs3kMW0tmj2U4Jx5WCIGPPmjzTqLhQVtM66o70Uo6TJw9P27TBAKArqhLv3bzHgU= This patch changes the -fopt-info default to optimized instead of all, since the latter is extremely verbose. This reduced the -fopt-info output by over 75% in at least one case, since the vectorizer has many messages under MSG_NOTE (and that should grow as more passes are converted to the new dump infrastructure). The default now emits high-level optimization success info (currently for unrolling, inlining and vectorization). Also changed which vectorization summary messages are emitted under -fopt-info(=optimized), to be more consistent with the format of the optimization summary messages emitted by the unroller and inliner, and fixed the loop vectorization summary message to use dump_printf_loc instead of manually emitting the location info. Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? 2013-05-31 Teresa Johnson * dumpfile.c (opt_info_switch_p): Change -fopt-info default to -fopt-info=optimized instead of all. * doc/invoke.texi: Ditto. * tree-vectorizer.c (vectorize_loops): Emit loop vectorization success under MSG_ALL, and use dump_printf_loc. (execute_vect_slp): Emit BB vectorization success under MSG_OPTIMIZED_LOCATIONS. * tree-vect-slp.c (vect_make_slp_decision): Ditto. (vect_slp_transform_bb): Change MSG_OPTIMIZED_LOCATIONS to MSG_NOTE. * tree-vect-loop.c (vect_transform_loop): Ditto. Index: tree-vect-loop.c =================================================================== --- tree-vect-loop.c (revision 199423) +++ tree-vect-loop.c (working copy) @@ -5801,7 +5801,7 @@ vect_transform_loop (loop_vec_info loop_vinfo) if (dump_enabled_p ()) { - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, + dump_printf_loc (MSG_NOTE, vect_location, "LOOP VECTORIZED\n"); if (loop->inner) dump_printf_loc (MSG_NOTE, vect_location, Index: dumpfile.c =================================================================== --- dumpfile.c (revision 199423) +++ dumpfile.c (working copy) @@ -866,7 +866,7 @@ opt_info_switch_p (const char *arg) file_seen = xstrdup (filename); if (!flags) - flags = MSG_ALL; + flags = MSG_OPTIMIZED_LOCATIONS; if (!optgroup_flags) optgroup_flags = OPTGROUP_ALL; Index: tree-vectorizer.c =================================================================== --- tree-vectorizer.c (revision 199423) +++ tree-vectorizer.c (working copy) @@ -118,8 +118,7 @@ vectorize_loops (void) if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOC && dump_enabled_p ()) - dump_printf (MSG_NOTE, "\n\nVectorizing loop at %s:%d\n", - LOC_FILE (vect_location), LOC_LINE (vect_location)); + dump_printf_loc (MSG_ALL, vect_location, "Vectorized loop\n"); vect_transform_loop (loop_vinfo); num_vectorized_loops++; } @@ -179,7 +178,7 @@ execute_vect_slp (void) { vect_slp_transform_bb (bb); if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, "basic block vectorized using SLP\n"); } } Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 199423) +++ doc/invoke.texi (working copy) @@ -6172,7 +6172,7 @@ Controls optimization dumps from various optimizat @samp{-@var{options}} form is used, @var{options} is a list of @samp{-} separated options to select the dump details and optimizations. If @var{options} is not specified, it defaults to -@option{all} for details and @option{optall} for optimization +@option{optimized} for details and @option{optall} for optimization groups. If the @var{filename} is not specified, it defaults to @file{stderr}. Note that the output @var{filename} will be overwritten in case of multiple translation units. If a combined output from Index: tree-vect-slp.c =================================================================== --- tree-vect-slp.c (revision 199423) +++ tree-vect-slp.c (working copy) @@ -1698,8 +1698,8 @@ vect_make_slp_decision (loop_vec_info loop_vinfo) LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo) = unrolling_factor; if (decided_to_slp && dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, - "Decided to SLP %d instances. Unrolling factor %d", + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, + "Vectorized %d SLP instances with unroll factor %d", decided_to_slp, unrolling_factor); return (decided_to_slp > 0); @@ -3181,7 +3181,7 @@ vect_slp_transform_bb (basic_block bb) } if (dump_enabled_p ()) - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, + dump_printf_loc (MSG_NOTE, vect_location, "BASIC BLOCK VECTORIZED\n"); destroy_bb_vec_info (bb_vinfo);