From patchwork Fri May 31 02:03:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 247828 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 9B29D2C02A5 for ; Fri, 31 May 2013 12:03:59 +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:in-reply-to:references:date:message-id:subject :from:to:content-type; q=dns; s=default; b=gBQzww483HZhC/yHmTQ0+ gUCgHU6jTZ9/PZ9Y34ps0U9Demau0TLcruaYidwuUyCKXtoizM73qscZE+Eb4fDu N9n30pBmhaq4/ETcWnoCHcYpYVlzE6324GQPvS+8PAzKiYl2vgTsYhpgDF8TaJFA C5MHKq4ka1GfXEL9YQS/JU= 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:in-reply-to:references:date:message-id:subject :from:to:content-type; s=default; bh=J4s2BOt/KQqamAaJCF9ZzHnjHkU =; b=yUKlU1fXXBzLpUi4UMGEq7lMin1sh2w7F6Tseu8ws6OCK5eo2n00LGIrBtK n6re7eLlsUPU5iiGjggWdU0D1Zl03ujQzBsqlo0l4YSaqvZQOxEEiWMWWzp5UVMY I3csgBKMSA7w4L/Z/kp5DUx0gsIeVQwMZc1MHyQqzfWbfbxU= Received: (qmail 28036 invoked by alias); 31 May 2013 02:03:52 -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 28019 invoked by uid 89); 31 May 2013 02:03:52 -0000 X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS, TW_TM autolearn=ham version=3.3.1 Received: from mail-qe0-f48.google.com (HELO mail-qe0-f48.google.com) (209.85.128.48) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 02:03:50 +0000 Received: by mail-qe0-f48.google.com with SMTP id 2so594445qea.21 for ; Thu, 30 May 2013 19:03:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=aRFysJBprgxQAS4p44XvgSPSUxb9DIV2vMOohbxXbRo=; b=GYdSQ0Q9P/CTpRQSvTo3LFw4hDXUuhqgPVjihP8/ULXintdpdJ02R9pRYKBBkDQAoe M+t6ShNELQ58wK5RlQ09GWVp8j95A/b5stL4xyqG3rvk8PbQS7v1uOfbpoGD0NyKd2Gq HGo9wtXSVGXZE9mwPc/TrLJ46AybioRSVp/YfhLCNyD+3ih+5cx/TT9hiyGwZAOBe6ju lF9Ac4WXx8nB/70OR8orzmByYGme3Iuqk6A0tOtY/DLtU9p4sQ38ZrMKmJZyoCa72uUj d+EfnflRB71HCeSGp5i+6hYyF2IWQq5/e9FNSdxET5gFRRtiEe7ylH9U5fM8KpwhoMoL ZD3A== MIME-Version: 1.0 X-Received: by 10.49.130.131 with SMTP id oe3mr8995068qeb.24.1369965828768; Thu, 30 May 2013 19:03:48 -0700 (PDT) Received: by 10.49.42.37 with HTTP; Thu, 30 May 2013 19:03:48 -0700 (PDT) In-Reply-To: <20130531014915.9335980792@tjsboxrox.mtv.corp.google.com> References: <20130531014915.9335980792@tjsboxrox.mtv.corp.google.com> Date: Thu, 30 May 2013 19:03:48 -0700 Message-ID: Subject: Re: [google] Prune -fopt-info output From: Teresa Johnson To: David Li , "gcc-patches@gcc.gnu.org" X-Gm-Message-State: ALoCoQkCSPU9rWh2BOcsUqCqi7163sU238cvK69QZuGxnqzoxmQEDgh4OfTzSyDfOhhxOUqp34yqrTaaYh+zWiw6vJpTr54C0Q74oaou1a5pL/1i8MoNCDne7F1trbuA+yqytBZv8idhLicQf9Fd3q0y//TBqmciuvgZ03tOsKzxyIRX06t5YK+PKg8/uMF+3PvhFGWWrqpO Testing passed. I forgot to include the documentation change in the first patch: Teresa On Thu, May 30, 2013 at 6:49 PM, Teresa Johnson wrote: > This patch reduces the copious -fopt-info output by making the default for > -fopt-info to be -fopt-info=optimized instead of -fopt-info=all. It also > changes most of the vectorizer messages to use MSG_NOTE instead of > MSG_OPTIMIZED_LOCATION. > > Reduced the output of -fopt-info for one application by >75%. Testing in > progress. > > Ok for google/4_8 if testing passes? > > Thanks, Teresa > > Index: dumpfile.c > =================================================================== > --- dumpfile.c (revision 199426) > +++ dumpfile.c (working copy) > @@ -867,7 +867,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-vect-loop-manip.c > =================================================================== > --- tree-vect-loop-manip.c (revision 199426) > +++ tree-vect-loop-manip.c (working copy) > @@ -1774,7 +1774,7 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop > gimple_seq cond_expr_stmt_list = NULL; > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "=== vect_do_peeling_for_loop_bound ==="); > > initialize_original_copy_tables (); > @@ -1828,7 +1828,7 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop > if (check_profitability) > max_iter = MAX (max_iter, (int) th - 1); > record_niter_bound (new_loop, double_int::from_shwi (max_iter), false, true); > - dump_printf (MSG_OPTIMIZED_LOCATIONS, > + dump_printf (MSG_NOTE, > "Setting upper bound of nb iterations for epilogue " > "loop to %d\n", max_iter); > > @@ -1893,7 +1893,7 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loo > int npeel = LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo); > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "known peeling = %d.", npeel); > > iters = build_int_cst (niters_type, npeel); > @@ -1948,9 +1948,9 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loo > > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "niters for prolog loop: "); > - dump_generic_expr (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, iters); > + dump_generic_expr (MSG_NOTE, TDF_SLIM, iters); > } > > var = create_tmp_var (niters_type, "prolog_loop_niters"); > @@ -2005,7 +2005,7 @@ vect_update_inits_of_drs (loop_vec_info loop_vinfo > struct data_reference *dr; > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "=== vect_update_inits_of_dr ==="); > > FOR_EACH_VEC_ELT (datarefs, i, dr) > @@ -2034,7 +2034,7 @@ vect_do_peeling_for_alignment (loop_vec_info loop_ > int bound = 0; > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "=== vect_do_peeling_for_alignment ==="); > > initialize_original_copy_tables (); > @@ -2062,7 +2062,7 @@ vect_do_peeling_for_alignment (loop_vec_info loop_ > if (check_profitability) > max_iter = MAX (max_iter, (int) th - 1); > record_niter_bound (new_loop, double_int::from_shwi (max_iter), false, true); > - dump_printf (MSG_OPTIMIZED_LOCATIONS, > + dump_printf (MSG_NOTE, > "Setting upper bound of nb iterations for prologue " > "loop to %d\n", max_iter); > > @@ -2349,11 +2349,11 @@ vect_create_cond_for_alias_checks (loop_vec_info l > > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "create runtime check for data references "); > - dump_generic_expr (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, DR_REF (dr_a)); > - dump_printf (MSG_OPTIMIZED_LOCATIONS, " and "); > - dump_generic_expr (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, DR_REF (dr_b)); > + dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_a)); > + dump_printf (MSG_NOTE, " and "); > + dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_b)); > } > > seg_a_min = addr_base_a; > @@ -2379,7 +2379,7 @@ vect_create_cond_for_alias_checks (loop_vec_info l > } > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "created %u versioning for alias checks.\n", > may_alias_ddrs.length ()); > } > Index: tree-vectorizer.c > =================================================================== > --- tree-vectorizer.c (revision 199426) > +++ tree-vectorizer.c (working copy) > @@ -107,7 +107,7 @@ vectorize_loops (void) > vect_location = find_loop_location (loop); > if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOC > && dump_enabled_p ()) > - dump_printf (MSG_ALL, "\nAnalyzing loop at %s:%d\n", > + dump_printf (MSG_NOTE, "\nAnalyzing loop at %s:%d\n", > LOC_FILE (vect_location), LOC_LINE (vect_location)); > > loop_vinfo = vect_analyze_loop (loop); > @@ -118,8 +118,7 @@ vectorize_loops (void) > > if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOC > && dump_enabled_p ()) > - dump_printf (MSG_ALL, "\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++; > } > @@ -129,7 +128,7 @@ vectorize_loops (void) > statistics_counter_event (cfun, "Vectorized loops", num_vectorized_loops); > if (dump_enabled_p () > || (num_vectorized_loops > 0 && dump_enabled_p ())) > - dump_printf_loc (MSG_ALL, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vectorized %u loops in function.\n", > num_vectorized_loops); > > Index: tree-vect-patterns.c > =================================================================== > --- tree-vect-patterns.c (revision 199426) > +++ tree-vect-patterns.c (working copy) > @@ -417,9 +417,9 @@ vect_recog_dot_prod_pattern (vec *stmts, t > > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_dot_prod_pattern: detected: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > /* We don't allow changing the order of the computation in the inner-loop > @@ -676,7 +676,7 @@ vect_recog_widen_mult_pattern (vec *stmts, > > /* Pattern detected. */ > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_widen_mult_pattern: detected: "); > > /* Check target support */ > @@ -913,9 +913,9 @@ vect_recog_widen_sum_pattern (vec *stmts, > > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_widen_sum_pattern: detected: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > /* We don't allow changing the order of the computation in the inner-loop > @@ -1218,9 +1218,9 @@ vect_recog_over_widening_pattern (vec *stm > > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "created pattern stmt: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > type = gimple_expr_type (stmt); > @@ -1286,9 +1286,9 @@ vect_recog_over_widening_pattern (vec *stm > /* Pattern detected. */ > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_over_widening_pattern: detected: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > return pattern_stmt; > @@ -1421,7 +1421,7 @@ vect_recog_widen_shift_pattern (vec *stmts > > /* Pattern detected. */ > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_widen_shift_pattern: detected: "); > > /* Check target support. */ > @@ -1567,7 +1567,7 @@ vect_recog_vector_vector_shift_pattern (vec > /* Pattern detected. */ > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_vector_vector_shift_pattern: detected: "); > > /* Pattern supported. Create a stmt to be used to replace the pattern. */ > @@ -1685,7 +1685,7 @@ vect_recog_divmod_pattern (vec *stmts, > > /* Pattern detected. */ > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_divmod_pattern: detected: "); > > cond = build2 (LT_EXPR, boolean_type_node, oprnd0, > @@ -2032,9 +2032,9 @@ vect_recog_divmod_pattern (vec *stmts, > /* Pattern detected. */ > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_divmod_pattern: detected: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > stmts->safe_push (last_stmt); > @@ -2199,7 +2199,7 @@ vect_recog_mixed_size_cond_pattern (vec *s > *type_out = vectype; > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_mixed_size_cond_pattern: detected: "); > > return pattern_stmt; > @@ -2592,7 +2592,7 @@ vect_recog_bool_pattern (vec *stmts, tree > *type_in = vectype; > stmts->safe_push (last_stmt); > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_bool_pattern: detected: "); > > return pattern_stmt; > @@ -2638,7 +2638,7 @@ vect_recog_bool_pattern (vec *stmts, tree > *type_in = vectype; > stmts->safe_push (last_stmt); > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "vect_recog_bool_pattern: detected: "); > return pattern_stmt; > } > @@ -2789,9 +2789,9 @@ vect_pattern_recog_1 (vect_recog_func_ptr vect_rec > /* Found a vectorizable pattern. */ > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "pattern recognized: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > /* Mark the stmts that are involved in the pattern. */ > @@ -2815,9 +2815,9 @@ vect_pattern_recog_1 (vect_recog_func_ptr vect_rec > pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info); > if (dump_enabled_p ()) > { > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "additional pattern stmt: "); > - dump_gimple_stmt (MSG_OPTIMIZED_LOCATIONS, TDF_SLIM, pattern_stmt, 0); > + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0); > } > > vect_mark_pattern_stmts (stmt, pattern_stmt, NULL_TREE); > Index: tree-vect-slp.c > =================================================================== > --- tree-vect-slp.c (revision 199426) > +++ tree-vect-slp.c (working copy) > @@ -1794,7 +1794,7 @@ vect_make_slp_decision (loop_vec_info loop_vinfo) > > if (decided_to_slp && dump_enabled_p ()) > dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > - "Decided to SLP %d instances. Unrolling factor %d", > + "Vectorized %d SLP instances with unroll factor %d", > decided_to_slp, unrolling_factor); > > return (decided_to_slp > 0); > @@ -3249,7 +3249,7 @@ vect_slp_transform_bb (basic_block bb) > } > > if (dump_enabled_p ()) > - dump_printf (MSG_OPTIMIZED_LOCATIONS, "BASIC BLOCK VECTORIZED\n"); > + dump_printf (MSG_NOTE, "BASIC BLOCK VECTORIZED\n"); > > destroy_bb_vec_info (bb_vinfo); > } > Index: tree-vect-loop.c > =================================================================== > --- tree-vect-loop.c (revision 199426) > +++ tree-vect-loop.c (working copy) > @@ -5779,8 +5779,8 @@ vect_transform_loop (loop_vec_info loop_vinfo) > update_ssa (TODO_update_ssa); > > if (dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, "LOOP VECTORIZED."); > + dump_printf_loc (MSG_NOTE, vect_location, "LOOP VECTORIZED."); > if (loop->inner && dump_enabled_p ()) > - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, > + dump_printf_loc (MSG_NOTE, vect_location, > "OUTER LOOP VECTORIZED."); > } Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 199426) +++ doc/invoke.texi (working copy) @@ -6219,7 +6219,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