From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26246 invoked by alias); 8 Jul 2011 08:30:30 -0000 Received: (qmail 26220 invoked by uid 22791); 8 Jul 2011 08:30:28 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Fri, 08 Jul 2011 08:30:13 +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 9A9228CC2B for ; Fri, 8 Jul 2011 10:30:11 +0200 (CEST) Date: Fri, 08 Jul 2011 08:33:00 -0000 From: Richard Guenther To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH, SRA] Dump that a structure is too big for total scalarization In-Reply-To: <20110707183713.GC3584@virgil.arch.suse.de> Message-ID: References: <20110707183713.GC3584@virgil.arch.suse.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-2113053386-1310113811=:810" 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-07/txt/msg00590.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-2113053386-1310113811=:810 Content-Type: TEXT/PLAIN; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-length: 2496 On Thu, 7 Jul 2011, Martin Jambor wrote: > Hi, > > in order to better analyze what SRA is or is not doing, it is > sometimes advantageous to have in the dump information that a > structure was not subject to total scalarization because it was too > big - if we have detailed dumping on, that is. > > This is accomplished by the patch below. It is currently undergoing a > bootstrap and testsuite run on x86_64-linux. OK if it passes? Ok. Thanks, Richard. > Thanks, > > Martin > > > 2011-07-07 Martin Jambor > > * tree-sra.c (analyze_all_variable_accesses): Dump that a struture > is too big for total scalarization. > > Index: src/gcc/tree-sra.c > =================================================================== > *** src.orig/gcc/tree-sra.c > --- src/gcc/tree-sra.c > *************** analyze_all_variable_accesses (void) > *** 2312,2327 **** > tree var = referenced_var (i); > > if (TREE_CODE (var) == VAR_DECL > - && ((unsigned) tree_low_cst (TYPE_SIZE (TREE_TYPE (var)), 1) > - <= max_total_scalarization_size) > && type_consists_of_records_p (TREE_TYPE (var))) > { > ! completely_scalarize_var (var); > ! if (dump_file && (dump_flags & TDF_DETAILS)) > { > ! fprintf (dump_file, "Will attempt to totally scalarize "); > print_generic_expr (dump_file, var, 0); > ! fprintf (dump_file, " (UID: %u): \n", DECL_UID (var)); > } > } > } > --- 2312,2335 ---- > tree var = referenced_var (i); > > if (TREE_CODE (var) == VAR_DECL > && type_consists_of_records_p (TREE_TYPE (var))) > { > ! if ((unsigned) tree_low_cst (TYPE_SIZE (TREE_TYPE (var)), 1) > ! <= max_total_scalarization_size) > ! { > ! completely_scalarize_var (var); > ! if (dump_file && (dump_flags & TDF_DETAILS)) > ! { > ! fprintf (dump_file, "Will attempt to totally scalarize "); > ! print_generic_expr (dump_file, var, 0); > ! fprintf (dump_file, " (UID: %u): \n", DECL_UID (var)); > ! } > ! } > ! else if (dump_file && (dump_flags & TDF_DETAILS)) > { > ! fprintf (dump_file, "Too big to totally scalarize: "); > print_generic_expr (dump_file, var, 0); > ! fprintf (dump_file, " (UID: %u)\n", DECL_UID (var)); > } > } > } > > -- Richard Guenther Novell / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer --8323584-2113053386-1310113811=:810--