From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16269 invoked by alias); 1 Sep 2011 08:13:47 -0000 Received: (qmail 16254 invoked by uid 22791); 1 Sep 2011 08:13:45 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,FRT_OFFER2,RP_MATCHES_RCVD,TW_TM X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Sep 2011 08:13:31 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C5CB98891E; Thu, 1 Sep 2011 10:13:29 +0200 (CEST) Date: Thu, 01 Sep 2011 08:13:00 -0000 From: Richard Guenther To: Ira Rosen Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Make vectorizer dumps more comparable In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-756274827-1314864809=:2130" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00022.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323584-756274827-1314864809=:2130 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Content-length: 4781 On Thu, 1 Sep 2011, Ira Rosen wrote: > > > Richard Guenther wrote on 01/09/2011 10:33:23 AM: > > > On Thu, 1 Sep 2011, Ira Rosen wrote: > > > > > > > > > > > gcc-patches-owner@gcc.gnu.org wrote on 24/08/2011 02:20:50 PM: > > > > > > > > This avoids the file/location clutter in front of each line > > > > in the vectorizer dump. While this is useful for people > > > > requesting -fvectorizer-verbose=N in dump files this makes > > > > you unable to compare dumps for testcases on a branch and trunk. > > > > It also makes lines excessively long because the testsuite > > > > filename paths are so long. Very annoying. > > > > > > > > (I'd argue also that -fvectorizer-verbose=N dumps to the dump > > > > file if available and not always to stderr is bogus, but well ...) > > > > > > > > This patch has made my life a lot easier debugging the data > dependence > > > > stuff. > > > > > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, installed on > trunk. > > > > > > > > Richard. > > > > > > > > 2011-08-24 Richard Guenther > > > > > > > > * tree-vectorizer.c (vect_print_dump_info): Avoid the > > > > file and location clutter when dumping to dump files. > > > > > > > > > IMO it's a bad idea. It's now impossible to find anything when > compiling a > > > big file. How about only removing the file name? > > > > How about, as Micha suggested, print the location of the loop > > we currently investigate from vectorize_loops () where we > > call find_loop_location () instead? > > The problem is that a dump of a single loop can be pretty long, and "start > to analyze loop..."/"finish to analyze loop..." may be not visible enough. > I am OK with adding these printings though (in addition to line numbers). > > I understand why you didn't like to see the file location, but what's the > problem with the line number? Well, it seems to be different what everybody else does and it's highly redundant for a whole bunch of lines. But, it solves my diff issue and the overly long lines as well. Your patch changes both dump-file and stderr printing though, I did want to preserve stderr printing. For the dump-file I'd drop the 'line ' prefix and just print '%d: '. Btw, the diagnostic machinery does _not_ print locations for note (""), the location information is supposed to be printed in the heading warning/error. Thus, a much better format for stderr would be file.c:12: LOOP NOT VECTORIZED note: unsupported stmt '....' as the further notes will be printed with the 'loop location' which is confusing when dumping statements Richard. > Ira > > > > > Richard. > > > > > Index: tree-vectorizer.c > > > =================================================================== > > > --- tree-vectorizer.c (revision 178374) > > > +++ tree-vectorizer.c (working copy) > > > @@ -149,16 +149,12 @@ vect_print_dump_info (enum vect_verbosit > > > if (!current_function_decl || !vect_dump) > > > return false; > > > > > > - if (dump_file) > > > - fprintf (vect_dump, "\n"); > > > - > > > - else if (vect_location == UNKNOWN_LOC) > > > - fprintf (vect_dump, "\n%s:%d: note: ", > > > - DECL_SOURCE_FILE (current_function_decl), > > > + if (vect_location == UNKNOWN_LOC) > > > + fprintf (vect_dump, "\nline %d: ", > > > DECL_SOURCE_LINE (current_function_decl)); > > > else > > > - fprintf (vect_dump, "\n%s:%d: note: ", > > > - LOC_FILE (vect_location), LOC_LINE (vect_location)); > > > + fprintf (vect_dump, "\nline %d: ", > > > + LOC_LINE (vect_location)); > > > > > > return true; > > > } > > > > > > Ira > > > > > > > > > > > Index: gcc/tree-vectorizer.c > > > > =================================================================== > > > > --- gcc/tree-vectorizer.c (revision 178028) > > > > +++ gcc/tree-vectorizer.c (working copy) > > > > @@ -149,7 +149,10 @@ vect_print_dump_info (enum vect_verbosit > > > > if (!current_function_decl || !vect_dump) > > > > return false; > > > > > > > > - if (vect_location == UNKNOWN_LOC) > > > > + if (dump_file) > > > > + fprintf (vect_dump, "\n"); > > > > + > > > > + else if (vect_location == UNKNOWN_LOC) > > > > fprintf (vect_dump, "\n%s:%d: note: ", > > > > DECL_SOURCE_FILE (current_function_decl), > > > > DECL_SOURCE_LINE (current_function_decl)); > > > > > > > > > > > > > > -- > > Richard Guenther > > SUSE / SUSE Labs > > SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 > > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer --8323584-756274827-1314864809=:2130--