From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32617 invoked by alias); 2 Aug 2011 13:23:46 -0000 Received: (qmail 32607 invoked by uid 22791); 2 Aug 2011 13:23:45 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 13:23:30 +0000 Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p72DNTVp022184 for ; Tue, 2 Aug 2011 06:23:29 -0700 Received: from gya1 (gya1.prod.google.com [10.243.49.1]) by hpaq13.eem.corp.google.com with ESMTP id p72DLDdp022884 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 2 Aug 2011 06:23:27 -0700 Received: by gya1 with SMTP id 1so4697124gya.36 for ; Tue, 02 Aug 2011 06:23:27 -0700 (PDT) Received: by 10.143.99.10 with SMTP id b10mr3515629wfm.355.1312291407402; Tue, 02 Aug 2011 06:23:27 -0700 (PDT) Received: by 10.143.99.10 with SMTP id b10mr3515619wfm.355.1312291407268; Tue, 02 Aug 2011 06:23:27 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id z16sm1416156wff.10.2011.08.02.06.23.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Aug 2011 06:23:26 -0700 (PDT) From: Ian Lance Taylor To: Richard Guenther Cc: Mikael Pettersson , Michael Walle , Georg-Johann Lay , Hans-Peter Nilsson , Richard Henderson , gcc@gcc.gnu.org Subject: Re: libgcc: strange optimization References: <201108012230.29989.michael@walle.cc> <4E371AC5.5090509@redhat.com> <20023.47611.116809.875356@pilspetsen.it.uu.se> <4E37CAFB.5010401@gjlay.de> <27466ae6b9a714679fcba410cce130ba.squirrel@ssl.serverraum.org> <20023.59456.782598.31450@pilspetsen.it.uu.se> Date: Tue, 02 Aug 2011 13:23:00 -0000 In-Reply-To: (Richard Guenther's message of "Tue, 2 Aug 2011 14:22:49 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00051.txt.bz2 Richard Guenther writes: > Or go one step further and deprecate local register variables alltogether > (they IMHO don't make much sense, and rather the targets should provide > a way to properly constrain asm inputs and outputs). No, local register variables are documented as working and many programs rely on them. They are a straightforward way to get an asm argument in a specific register, and I don't see any reason to break that. > I suggest to amend the documentation for local call-clobbered register > variables to say that the only valid sequence using them is from a > non-inlinable function that contains only direct initializations of the > register variables from constants or parameters. Let's just implement those requirements in the compiler itself. Ian