From patchwork Thu Oct 21 06:51:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 68528 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 3DFFFB6EED for ; Thu, 21 Oct 2010 17:52:13 +1100 (EST) Received: (qmail 19575 invoked by alias); 21 Oct 2010 06:52:11 -0000 Received: (qmail 19567 invoked by uid 22791); 21 Oct 2010 06:52:10 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Oct 2010 06:52:02 +0000 Received: (qmail 27160 invoked from network); 21 Oct 2010 06:52:00 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Oct 2010 06:52:00 -0000 Message-ID: <4CBFE30C.7090308@codesourcery.com> Date: Thu, 21 Oct 2010 14:51:56 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.14) Gecko/20101006 Thunderbird/3.0.9 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [patch 2/3] tm.texi documentation on macro PREFERRED_RENAME_CLASS References: <4CBFE0BD.3080807@codesourcery.com> In-Reply-To: <4CBFE0BD.3080807@codesourcery.com> 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 gcc/ * doc/tm.texi: Documentation on new macro PREFERRED_RENAME_CLASS. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index e1e0957..40fc204 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2581,6 +2581,19 @@ only if neither labeling works. This macro also has strict and non-strict variants. @end defmac +@defmac PREFERRED_RENAME_CLASS (@var{class}) +A C expression that places additional restrictions on the register class +to use when it is necessary to rename a register in class +@var{class} to another class, or perhaps still @var{class}, +if you don't define this macro. + +Sometimes returning a more restrictive class makes better code. For +example, on ARM, thumb-2 instructions using @code{LOW_REGS} may be smaller than +instructions using @code{GENERIC_REGS}. By returning @code{LOW_REGS} from +@code{PREFERRED_RENAME_CLASS}, code size can be reduced. + +@end defmac + @defmac PREFERRED_RELOAD_CLASS (@var{x}, @var{class}) A C expression that places additional restrictions on the register class to use when it is necessary to copy value @var{x} into a register in class