From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22799 invoked by alias); 2 Jun 2011 10:24:59 -0000 Received: (qmail 22791 invoked by uid 22791); 2 Jun 2011 10:24:57 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 02 Jun 2011 10:24:40 +0000 Received: (qmail 28650 invoked by uid 20157); 2 Jun 2011 10:24:39 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Jun 2011 10:24:39 -0000 Date: Thu, 02 Jun 2011 10:24:00 -0000 From: Hans-Peter Nilsson To: Richard Sandiford cc: Richard Sandiford , Vladimir Makarov , gcc-patches Subject: Re: RFA: another patch to solve PR49154 In-Reply-To: <87boyir2pm.fsf@firetop.home> Message-ID: References: <4DDD7705.9020003@redhat.com> <4DDDB1EA.4080902@redhat.com> <4DDEBDB8.8000000@redhat.com> <87boyir2pm.fsf@firetop.home> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-06/txt/msg00136.txt.bz2 On Tue, 31 May 2011, Richard Sandiford wrote: > Gah, seems like I'd forgotten the "no subclasses" bit by the time > I started looking at code. Sorry for the false alarm. Still, the extra look made me realise that I should have restricted that statement to allocatable registers. (And I really do appreciate a look from a native speaker.) Updated patch follows, checked dvi and info output: * doc/tm.texi.in (Register Classes): Document rule for the narrowest register classes. * doc/tm.texi: Regenerate. Index: doc/tm.texi.in =================================================================== --- doc/tm.texi.in (revision 174376) +++ doc/tm.texi.in (working copy) @@ -2327,6 +2327,12 @@ constraints is through machine-dependent You can define such letters to correspond to various classes, then use them in operand constraints. +You must define the narrowest register classes for allocatable +registers, so that each class either has no subclasses, or that for +some mode, the move cost between registers within the class is +cheaper than moving a register in the class to or from memory +(@pxref{Costs}). + You should define a class for the union of two classes whenever some instruction allows both classes. For example, if an instruction allows either a floating point (coprocessor) register or a general register for a brgds, H-P