From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27746 invoked by alias); 2 Sep 2011 18:23:35 -0000 Received: (qmail 27732 invoked by uid 22791); 2 Sep 2011 18:23:33 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Sep 2011 18:23:17 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p82INH6E017005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Sep 2011 14:23:17 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p82INGLM012107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Sep 2011 14:23:17 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p82INFjg002755; Fri, 2 Sep 2011 20:23:15 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p82INElO002753; Fri, 2 Sep 2011 20:23:14 +0200 Date: Fri, 02 Sep 2011 18:23:00 -0000 From: Jakub Jelinek To: Paolo Carlini Cc: gcc-patches@gcc.gnu.org Subject: Re: [RFC, WIP] tree-ssa-strlen optimization pass Message-ID: <20110902182314.GV2687@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20110902165028.GU2687@tyan-ft48-01.lab.bos.redhat.com> <4E610F12.2000502@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E610F12.2000502@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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/msg00197.txt.bz2 On Fri, Sep 02, 2011 at 07:14:58PM +0200, Paolo Carlini wrote: > >Any comments related to the implementation, or examples of real-world > >lame C string length code sequences that would be nice to optimize > >will be greatly appreciated. > I'm only wondering how hard would be taking care more consistently > of the wchar_t counterparts of all these library functions. I don't > think user code using those is so uncommon, at least now that > internationalization is taken more and more seriously. I'm fairly sure it is much less common than the narrow versions, we don't even handle wprintf and wscanf attributes. Tracking not just char strings, but also wchar_t (or either char, or wchar_t) would complicate the pass somewhat, but I'm more worried that it would not be stressed enough in real-world code and thus would be less tested than would be desirable. Plus it is very premature when none of the wcs* builtins are actually handled in builtins.c and we don't have infrastructure for that. Jakub