From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13537 invoked by alias); 2 Aug 2011 17:21:37 -0000 Received: (qmail 13527 invoked by uid 22791); 2 Aug 2011 17:21:35 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 17:21:17 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGOZE+TiTS5oCO8h4dKng== X-RZG-CLASS-ID: mo00 Received: from [192.168.2.100] (dslb-084-058-201-095.pools.arcor-ip.net [84.58.201.95]) by smtp.strato.de (jimi mo4) (RZmta 26.2) with ESMTPA id h04a07n72GqKXi ; Tue, 2 Aug 2011 19:20:29 +0200 (MEST) Message-ID: <4E3831CD.5040800@gjlay.de> Date: Tue, 02 Aug 2011 17:21:00 -0000 From: Georg-Johann Lay User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) MIME-Version: 1.0 To: Richard Guenther CC: Mikael Pettersson , Michael Walle , 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00056.txt.bz2 Richard Guenther schrieb: > 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. > > Richard. That's completely counterproductive. If a developer invents asm or local register variables he has a very good reason for that choice like to meet hard (with hard as in HARD) real time constraints. Disabling inlining a function that uses local register vars would make many places of local register vars unusable because thre would no more be a way to write down the exact register usage footprint of a piece of asm. Typical use-cases are interfacing to a function that has a smaller register footprint than an ordinary block-box function or doing some arithmetic that needs special hard regs for which there are no fitting constraints. All this will be impossible if inlining is disabled for such functions; then it is no more possible to describe such a low-overhead piece of code without calling a black box function, clobber all call-clobbered registers, render a maybe tail-function into a non tail-call function etc. Embedded systems like ARM or PowerPC based get more and more important over the years and GCC should put more attention to them and their needs; not only to bolide servers/PCs. This includes systems with hard real time constraints. Johann