From patchwork Sat Aug 18 11:49:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitrios Apostolou X-Patchwork-Id: 178455 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]) by ozlabs.org (Postfix) with SMTP id 0D0BD2C00A0 for ; Sat, 18 Aug 2012 21:50:19 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345895420; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: User-Agent:MIME-Version:Content-Type:Content-ID:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=IuisQQkdzDOgl/YAQbjWgKJJoT4=; b=X5hdwVFxIsrW8T+z970My5Bne1H3QzGOg1iYO9ubHDNn5SQOp9cAIsszRDeAXA sI6IJ2a3sJiqo1tX0A3biAceIZC/kHuH3uvh/rLd+pIBOz35nZ6dI6pQOMnqz4fl hvhG988kcGT8JpO+xkkCxIP53ZwtaWlovWj23lfh/TGS8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type:Content-ID:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=sZNKssD7wUAYRacOa7P7YlJJXX2tzyy76R4uql12B8WJDlA0xk+TGN/ooEQ/nu oYDhwMwgpB31AQlWqSj/KVYwpj2tuQe+HNsY2YLTkqnnDFXsK2lH/u+KhEuj9V9+ MEBHW8KqADPnYL41mlWcqCdbdbDlA36JbcQbKJTt4Guog=; Received: (qmail 26585 invoked by alias); 18 Aug 2012 11:50:14 -0000 Received: (qmail 26564 invoked by uid 22791); 18 Aug 2012 11:50:13 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KHOP_THREADED, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 18 Aug 2012 11:49:58 +0000 Received: (qmail invoked by alias); 18 Aug 2012 11:49:56 -0000 Received: from teras.ics.forth.gr (EHLO teras.ics.forth.gr) [139.91.70.93] by mail.gmx.net (mp071) with SMTP; 18 Aug 2012 13:49:56 +0200 Date: Sat, 18 Aug 2012 14:49:53 +0300 (EEST) From: Dimitrios Apostolou To: gcc-patches@gcc.gnu.org cc: Andrey Belevantsev Subject: Re: Speedups/Cleanups: End of GSOC patch collection In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-ID: X-IsSubscribed: yes 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 2012-08-18 Dimitrios Apostolou * dwarf2out.c (output_indirect_string): Use ASM_OUTPUT_INTERNAL_LABEL instead of slower ASM_OUTPUT_LABEL. * varasm.c (assemble_string): Don't break string in chunks, this is assembler specific and already done in most versions of ASM_OUTPUT_ASCII. I think there is no correctness issue regarding output_indirect_string() since .debug_str are always compiler generated labels, and this gives a small speedup with -g3 debug info. And regarding assemble_string() I find it superfluous to break it in two places. I found only the following versions of ASM_OUTPUT_ASCII not caring about string length, I guess the assemblers don't have a limit: arm.c: vmsdbgout.c:ASM_OUTPUT_ASCII picochip.c: picochip_output_ascii() pdp11.c: output_ascii() Thanks, Dimitris === modified file 'gcc/dwarf2out.c' --- gcc/dwarf2out.c 2012-08-15 01:56:07 +0000 +++ gcc/dwarf2out.c 2012-08-16 06:19:19 +0000 @@ -20887,7 +20887,7 @@ output_indirect_string (void **h, void * if (node->form == DW_FORM_strp) { switch_to_section (debug_str_section); - ASM_OUTPUT_LABEL (asm_out_file, node->label); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, node->label); assemble_string (node->str, strlen (node->str) + 1); } === modified file 'gcc/varasm.c' --- gcc/varasm.c 2012-08-15 01:56:07 +0000 +++ gcc/varasm.c 2012-08-16 06:12:28 +0000 @@ -1726,22 +1726,7 @@ assemble_align (int align) void assemble_string (const char *p, int size) { - int pos = 0; - int maximum = 2000; - - /* If the string is very long, split it up. */ - - while (pos < size) - { - int thissize = size - pos; - if (thissize > maximum) - thissize = maximum; - - ASM_OUTPUT_ASCII (asm_out_file, p, thissize); - - pos += thissize; - p += thissize; - } + ASM_OUTPUT_ASCII (asm_out_file, p, size); }